12-18-2023 07:51 AM
Hello,
I need to filter a payload based on user entered parameters. The user can use the fieldsNames parameter to provide a list of fields they want returned, instead of all 30 attributes in the payload. In the examples below I need to filter the payload down to the list of fields specified in the fieldNames parameter. If an attribute in the gsn section is part of the fieldNames parameter then the gsn tag must be included else it can be left out. Any help is very much appreciated. Thank you.
Example1:
parameter: fieldNames = "rpn,gpn,artcode,gtin,grossWeight"
Example2:
parameter: fieldNames = "rpn,gpn,artcode"
Solved! Go to Solution.
12-19-2023 05:50 AM
@Max - with the solution provided, you can get the desired output you show above.
Only gsn:
Then without gsn:
By the way, if you are calling this from a triggered task to specify the fields you want, make sure you clear any default values from your task definition.
Hope this helps!
12-19-2023 05:50 AM
@Max - with the solution provided, you can get the desired output you show above.
Only gsn:
Then without gsn:
By the way, if you are calling this from a triggered task to specify the fields you want, make sure you clear any default values from your task definition.
Hope this helps!