Restrict my XY to min/max values,
I have a work flow that search for XY, and I want to restrict my XY to a min/Max values.
Unfortunately, I am not a developer and I don’t have enough experience in VB expression, I tired the expression below and it doesn’t work, any suggestion?
("lon >= 176660 or lon <=156153 or lon >=211309 or lon <= 73150 or lat >= 220335 or lat <=77418 or lat >= 137834 or lat<= 73150")
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000TSOG&feoid=Body&refid=0EM60000000LvJA" _/_img_
Thank you in advance,
Best,
Majdoleen
0
-
It looks like you are using several different XY coordinate values. It would be easiest to check these at inital input using the RegEx rather than later in the Workflow. However, you can further check using something like: (XMin >= lon < XMax) AND (YMin >= lat >= YMax) ((XMin >= lon < XMax) AND (YMin >= lat >= YMax)) OR ((XMin >= lon < XMax) AND (YMin >= lat >= YMax))Change out XMin/XMax/YMin/YMax to the values you need.0 -
Thank you Tom, really appreciate.
But it seems it doesn't work with me (attached).
Could you please send me a workflow that contains the activity or the RegEx that you mentioned?
Thank you in advance.
Best,
Majdoleen0 -
What does the error say if you hover over it? It looks like you have pasted it into a string.
There is not much to the Regex Validators. You can find them:
0 -
Thank you Tom,
The error is as seen:
And in the second option, as I can see you only can add one min value and one max, but in my case I want 2 minimum values for X and 2 min values for Y.
Any suggestion?
Thank you in advance.
Best,
Majdoleen0 -
So in the first image, what it is telling you is that you have a type mismatch. You are comparing numbers but have pasted the comparison into a string. Remove the quotes.
As for the Validators, you can setup more than one. Put in two numeric range validators with the valid ranges.0 -
Thank you Tom, I've used this code (156153 >= longitude AND longitude < 176660) OR (73150 >= longitude AND longitude < 211309) OR (77418 >= latitude AND latitude < 220335) OR (86906 >= latitude AND latitude < 137834) after cast the string to double and it is working fine with me.
Thank you in advance,
Best,
Majdoleen0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
6 kommentarer