Hi, I want to call API and resonse in multi select dropdown when user selected multiple selection dropdown option need to pass the values as in array.
example: ['slectedvalue1','slectedvalue3, 'slectedvalue3', ]
Please help here.
Hi Pavan
Maybe you can try this approach. You can check the Oml file for your reference.
So what I did was to create a Local variable called 'Array' that you will use to pass in your API
and loop through each record of the 'SelectedOptionList' and build the array string
Just make sure you clear the 'Array' variable everytime you call the onchange event of the dropdown
Here is the result of that
Thanks, I have tried, but the datatype which i am looking for is long integer, that where i got stuck.
Would you be able to send the oml file ?
Hi Baby Bear,
PFA oml for your reference, and thanks for your help on this. Using Multiselect Forge component.
I dont think it is possible to store an array format text to an integer variable. what you can do is have a list of integer instead
Hi BabyBear,
If possible can you share me the example oml file, as i am new to OS
Basically a List is like an array in Outsystems
Hi,
I have tried to appened returing as ) value, my expectation was need to store the user selected value and new value selected in array format [0,1,2]. Could any one help me here
Would you be able to share an oml with the consumed REST Api?
Hi Pavan K,I believe BabyBear has already answerd your quesstion. You want to store the user selected value. Please follow BabyBear guildance.You want to pass values into array in API Body. Based on your image in Postman, you need a structure, then serialize it and send into API body. "ColorLayerIdList" is an integer array. So your structure will contain an attribute called ColorLayerIdList which its data type is (Long) Integer List. When serializing, OS will convert to it array.Regards,Nam