Hoppa till huvudinnehållet

Query Results in Display Form Description

Kommentarer

5 kommentarer

  • Berend Veldkamp
    For multiple features, I usually use a DisplayResultPicker.

     

    If this is not convenient in your workflow, and it has to be a DisplayForm, the easiest way would be to use a ForEach activity to loop over the features you have, and append whatever you want to display to the same variable (i.e. Assign [To=myDescription, Value=myDescription & "Some value] )
    0
  • Permanently deleted user
    Hi Berend, Thank you for the suggestions. I actually reconfigured the Value in my Assign activity to this:

     

    If(booleanSupDistricts = True AND booleanZipCodes = True AND booleanCensusTracts = True, SupDistrictString & System.Environment.NewLine & ZipString & System.Environment.NewLine & CensusTractString,

     

    If(booleanSupDistricts = True AND booleanZipCodes = True, SupDistrictString & System.Environment.NewLine & ZipString,

     

    If(booleanZipCodes = True AND booleanCensusTracts = True, ZipString & System.Environment.NewLine & CensusTractString,

     

    If(booleanSupDistricts = True AND booleanCensusTracts = True, SupDistrictString & System.Environment.NewLine & CensusTractString,

     

    If(booleanSupDistricts = True, SupDistrictString,

     

    If(booleanZipCodes = True, ZipString,

     

    If(booleanCensusTracts = True, CensusTractString, "Error")))))))

     

    And it works.

     

    However, right now, there are only three options for the users to query: Supervisor Districts, Zip Codes, and Census Tracts. I'm concered if we add more options to this list, this Assign activity would be out of control with all of the possible selection combinations...

     

    Any ideas how to clean this up?
    0
  • Zack Robison
    Yup!  I've been having lots of fun with the "form results" output parameter of the display forms the past year or so.  It's a dictionary (string:string IIRC) of all the output arguments in the form with their values.

     

    You can traverse the dictionary a few ways... going through a list of strings to pass in as keys and run your runtime logic, iterate the whole dictionary to run the logic, or iterate the whole dictionary and only run the logic for keys with like a flag in the name.

     

    You'll also need a way to connect the out arg names to the format of the string value, I usually create a dictionary earlier in the workflow with all of the entries I'm interested in and the out args as the keys there (that's what I'd iterate in the runtime BTW, as to ignore any other output args that I'm disinterested in) and do something like if the earlier form output has this value then run string format and append.
    0
  • Zack Robison
    ^ This is basically half of how to do dynamic forms btw.
    0
  • Permanently deleted user
    Thank you for the response Zack! Any chance you have a workflow sample showing how this works?
    0

Du måste logga in om du vill lämna en kommentar.