Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have two listboxes testCase and testCaseByID, and right now I am using a trigger Select in Field, so that whenever someone selects a value from testCaseByID it selects in testCase and I do this by using getFieldSelection(testCaseByID) to change the field testCase. However, whenever someone selects multiple from testCaseByID, getFieldSelection doesn't work and nothing gets selected in testCase. Is there any other way to do this?
Thanks,
Natasha
Hi Natasha,
On your trigger, you should do something like this:
Selection on field so it can select the values on the other field and for exrpession, use this:
='(' & replace(GetFieldSelections(Client),',','|') & ')'
it replaces the string "A,B" for something like "(A|B)" that is the multiple string query.
Felipe.
Replace isn't necessary because getfieldselections() has a second parameter for it and the third parameter will define the max. number of the returning values because the global default-number is often not very high and by more selected values it would return something like 'x of y' or 'Not ...'.
- Marcus
An alternatively to your approach might be to associate both fields within the datamodel or if you really need a loosen table for selections you could refer to them per set analysis within the expressions with something like:
sum({< testCase = p(testCaseByID)>} AnyValue)
- Marcus
How does your search string currently look like? I don't understand how a GetFieldSelections(testCaseByID)
returns the values for selection in testCase.
If both fields are linked in your data model, why not just use a Selection - Select possible action?
(If you really need to select the values, the associative logic should also work with just keep the values possible / white)