Question: how to extract Option Set as a list? I would assume the :converted to list function would do so, just like the extract with regex does for text values. However, it doesn’t.
__
Use-case: A user is searching for places to stay that has certain facilities. I am sending the search parameters to the URL, so the link can be shared with others. I now want to get the facilities from the URL and use them to compare whether a Listing has these facilities.
I have succeeded in doing this by comparing text value to text value, but it seems to slow down performance significantly. Thus, I would like to compare it as OptionSet instead.
Setup:
My Option Set is defined like this:
I have a data type called Listing which has the following setup:
I am sending the OptionSet values as search parameters to my url. Url ooks like this: /version-test/test?facility=Toilet%20Water
The problem is to Get the values from the URL. It works fine when getting it as text, but getting it as optionFacility is a problem, once there are more values than one.
Setup extract as type “text”
Setup extract as type “OptionFacility”
EXAMPLE 1: ONE VALUE
It works fine when there is one facility: /version-test/test?facility=Toilet
EXAMPLE 2: TWO VALUES
But fails when there is two or more values, it cannot get as OptionFacility: /version-test/test?facility=Toilet%20Water
__
So… how to extract Option Set as a list? I would assume the :converted to list function would do so, just like the extract with regex does for text values.
Any help would be greatly appreciated. Been stuck on this for a while now!