Hoppa till huvudinnehållet

Set Layer Definition Removing all Points

Kommentarer

8 kommentarer

  • John Nerge
    Can you post the workflow?
    0
  • Permanently deleted user
    Workflow can be found here...

     

    https://drive.google.com/file/d/0B5rgPuFOw9yfZWYwVVMyWnV6YmM/view?usp=sharing

     

    And yes, this is a very similiar workflow to the one in my other post. I've literally created 6 different workflows to try to accomplish the same task (one with combo boxes, one with an autocomplete box, one with radio boxes....you get the idea) I'm clearly struggling! I appreciate any help you can provide. And I'll try to not to double post as much! I'm a forum hog! Sorry!
    0
  • John Nerge
    I think I found the issue. Your Definition argument in the Set Layer Definition activity is currently:

     

    "DESCRIPTION = '&outrisk&'"

     

    Right now that's saying the DESCRIPTION value should be the literal string "&outrisk&". That's a valid search, so you're not getting an error, but naturally none of your points have DESCRIPTION values like that.

     

    You need some additional quotation marks:

     

    "DESCRIPTION = '" & outrisk & "'"

     

    which parses to, DESCRIPTION = ' + your user selected value + '

     

    which gives you the complete Definition of DESCRIPTION = 'your user selected value'
    0
  • Permanently deleted user
    Yahoo! Thank you so much John!  I ended up changing the autocomplete box back to a combo box, and just cast the output to a string, works great! Thank you Thank you Thank you!

     

    So how did you know that it needed the extra quote marks? I dont have any sort of programming background so I'm completely in the dark when it comes to this stuff. Can you recommend any resources that might help with these workflows? I've slide by so far by reading posts, posting in the forum, and working off of other people sample workflows, but I'd like to be able to do this on my own!
    0
  • John Nerge
    I'm not a programmer either, so I've just picked it up as I go too. As far as Workflow Desginer, it's my experience that many of the input arguments have to be strings, so when you want to use user input or other variables you need to do string concatenation.

     

    The best tip I have for testing that kind of stuff out is to add an Alert to your workflow and set the text to the string you're testing. That way you can look at what's being passed to the activity and can assess whether it's in the right format or not.
    0
  • Permanently deleted user
    Hi John,

     

      So I am actually trying to allow people to choose a date range AND a risk level to filter the points on the map. I broke it up initially so it wasn't so overwhelming trying to figure it out...I'm a little unsure of how to combine the two expressions so the map filters by date AND risk level...

     

    https://drive.google.com/file/d/0B5rgPuFOw9yfS1dPVXAzRHJNeEU/view?usp=sharing
    0
  • Permanently deleted user
    Hi Lisa

     

    how about a third Assign after the two that you have already:

     

    queryExpression  =    "(" & queryExpression & ") AND (" & riskassign & ")"

     

    Regards

     

    Ralph Price
    0
  • Permanently deleted user
    Perfect! I tried just having two 'Set Layer Definition' activities, which worked, but this is much more responsive! Thank you so much John and Ralph!
    0

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