Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i need to create a search box related to a field admitting multiple values, using one of these 2 options:
- upload a text/csv/xls file
- insert a string of values like value1, value2, value 3
Any idea on how to proceed?
Thanks in advance
Bruno
The second option could be implemented like this:
- create an input box with variable vTest
- enter the values in the Input box, comma separated: 01,02,04,06
- Create a button with action Selection - Select in field
- Enter the field name you want to search for and as search string:
='('&replace(vTest,',','|')&')'
See also attached.
If you manage to read in your file, you could reuse the button with action also for option 1.
Hope this helps,
Stefan
The second option could be implemented like this:
- create an input box with variable vTest
- enter the values in the Input box, comma separated: 01,02,04,06
- Create a button with action Selection - Select in field
- Enter the field name you want to search for and as search string:
='('&replace(vTest,',','|')&')'
See also attached.
If you manage to read in your file, you could reuse the button with action also for option 1.
Hope this helps,
Stefan
unfortunately I need to give the user the opportunity of entering multiple selection which are different every time
Hm, not sure if I understand: What's wrong with entering these values in the input box as string, comma separated, then?
At least this is how I understand you initial post regarding option 2.
Sorry, you are right it is working correctly!
Just one question: do you know how many values is possible to enter in?
I know of no limitation for variable length.
Another idea: Instead of using a button action, you could also use a trigger on variable set / change in document properties, so just entering / changing values will already do the job.
Using the expression dialog for entering the values also allows quite easily to copy / paste your values from an external file.
Is it possible to use another separator?
I was thinking to (*), how i have to rewrite the search string?
You are talking about the comma in your input box as separator, right?
This separator is replaced by the replace function with the separator needed by the search string (this you can't change):
='('&replace(vTest,',','|')&')'
So just replace the second parameter ',' with '*':
='('&replace(vTest,'*','|')&')'
Hi,
Thanks for sharing the post. I have implemented this and its working fine on development machine.
But "Edit expression button" is not visible after deployment.
I am missing something or its browser issue.
Thanks
Sandeep
Hello,
One way to easily accomplish what you would like to do is to create a list box for the required field that need to be search for.
In the List Box properties, in the "General" folder, select the field that need to be listed and select "Wildcard search" for "Default search mode", in the "Sort" folder select "Auto ascending" for "State"and in "Caption" folder tick or select SEARCH in the "Special icons" window.
The user can then use the magnifier (search icon) that is displayed in the Title caption of the listbox to look for multiple value. He will have to search the first data, then select it, search another data, but before selecting it keep CTRL Key pressed while selecting the data etc ...
Each selected data will appear on the top of possible data in the listbox
Of course you can use a button to toogle on/off the display of the listbox for convenience purpose.