Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a trigger that will select certain values in one field based on the selections made by the user in another field.
I've got it working except for one thing - I can't get the search mask to work on the second field when the values contain spaces.
The general format for a search string mask is (ValueA|ValueB|ValueC). That works fine.
However, if any of the values have spaces (Value A|Value B|Value C) , the search mask doesn't seem to work.
See attached QVW for a working example.
Does anyone know how to make a search string mask work when the values contain spaces?
Wierd. I'm surprised quotes doesn't work, but I tried them all. I found a workaround. Change your search string variable to:
'(ALL|' & Replace(only(Field1), ' ', '?') & ')'
All spaces will be replaced by questions marks, which mean any character. That might not work in all situations, but I couldn't find anything better.
Also, you could probably do this as Select in Field: ALL then ToggleSelect: only(field1)
Wierd. I'm surprised quotes doesn't work, but I tried them all. I found a workaround. Change your search string variable to:
'(ALL|' & Replace(only(Field1), ' ', '?') & ')'
All spaces will be replaced by questions marks, which mean any character. That might not work in all situations, but I couldn't find anything better.
Also, you could probably do this as Select in Field: ALL then ToggleSelect: only(field1)
Awesome. Thanks! The question mark replacement worked great.
I couldn't get the ToggleSelect to work, though...
For the ToggleSelect, you would need: =only(Field1)
I think I forgot the equals sign and used a lower case f in my example. Here is the application using ToggleSelect instead of the Search String.
Got it. Thanks!