Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a list of sales people that I want to use as the search string for a button, using "Select in Field". I create a variable from an Excel
file that is maintained by our Admin group (this way, I don't have to change any code when we add/lose sales people, as happens frequently!). The variable is called "vUSSalesPipe", and consists of the four-letter user codes with a 'pipe' (ASC(124)) in between.
To check my routine, I have a text box: ='the variable is '('&'$(vUSSalesPipe)'&')' The output of the text box is shown below:
This looks good to me. (I don't think I need spaces between user codes and the pipes, do I?)
So, in my Button properties, I chose "Select In Field", the correct field name, and in the search box entered:
= '('&'$(vUSSalesPipe)'&')' (note: I tried it both with and without the equals sign in front)
But when I select the Button, no users are selected.
I'm sure this is just a syntax error on my part, but if anyone has suggestions on how to accomplish this, I'd
appreciate their input!
thanks,
Kevin
Your field name is OMUser and not OMUSER. Are you using the correct fieldname?
I think for multiple select in field you need double quotes around each value
("BMOR"|"EKES"|...)
Modify your variable and add " after the opening parenthesis and before closing parenthesis:
= '("'&'$(vUSSalesPipe)'&'")'
Have you tried copying the complete literal to a list box search bar of that field?
(And I assume you just entered the field name in entry box of button action property, not leading equal sign?)
Could you post a small sample QVW that demonstrates your issue?
Hmm.. I tried putting in the formula (with and without preceding "=" sign in the Listbox) -> no result
However, when I manually typed in the first three values, e.g. (BMOR|EKES|HPRI), they were selected. However, that's in the Listbox search bar.
So, I don't think I need the "" as Sunny suggested (that's if you have two items between one set of pipes, IIRC, e.g.
("BMOR EKES" | HPRI).
Here's my button:
I tried the search string as above, with single quotes around it, and with a leading "=" sign (with and without single quotes). Not one of these is effective.
I'm sure I'm missing something simple, but what it is is beyond me at the moment!
Would you be able to share a screenshot of OMUSER listbox?
Absolutely..
Field name is correct, case sensitive?
Your field name is OMUser and not OMUSER. Are you using the correct fieldname?
Your expression works fine for me. Can you post a sample qvw?
-Rob
You and Stefan are correct.. the case was wrong.
In case anyone else is interested, the working solution was:
Thanks for everyone's help!