on 04-18-2023 4:55 PM
Hi there,
I am currently developing a bot that uses data from an API call to a backend CDS view. I want the user to be able to select an option from a list of buttons to proceed to the next step
the data that populates the button is coming from the API response. Is there a way using scripting syntax to remove duplicate values from the buttons?
I have tried to use the unique helper on the array being returned but this will not work as each object in the array is already containing unique values.
Any advice would be appreciated.
Thanks,
Leila
Hi Leila,
you could use the pluck helper to first extract the button values in an edit memory action as a flat array of values and pass this into the unique helper.
e.g. in the set variable action
{{unique (pluck api_service_response.default.body.results "club.name") }}
Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.