Rest api query form urlencoded support dynamic params?

my params size is dynamic, for example

request 1,
two params, id, isOpen

request 2
three params, id, isOpen, icon

when the value of this parameter is not updated, it does not to submit to api

how to solve this problem?

thanks

Hello, I think you should keep the last params in a object and store it in a variable when query runing success.

image

and in the advance tag of query you should judge if the params now is equal to the last which is store in variable.

thank you for your answer, the answer is not what I want

assuming my api have 8 input params,
id, icon, isOpen, paramA, paramB, paramC, paramD, paramE

this is an api for updating data based on id, I am creating an edit form,

when the data changes, I trigger the api and only submit the input parameters that have changed

id is required

icon, isOpen, paramA, paramB, paramC, paramD, paramE is not required

Hey @jk2K! Yes this is possible, and the syntax is very similar to how you have formatted the values already. In this case you can set the truthy ternary option to the key name, and the falsey option to an empty string.

The key and value will be dynamically determined based on user inputs etc:

Let me know if you have any follow up questions!

awesome, It did solve the problem

:+1:

1 Like