Hi there,
I'm trying to dynamically append values to a list parameter using the 'Parameter Preset' box when certain conditions are met for a transitional route.
The list parameter is defined as follows:
Then, during the route I use the following system function:
$sys.func.APPEND($session.params.negative_products, credit score)
However, when the condition is met during the conversation, the updated value in $session.params.negative_products is not: [" ", credit score], but prints out the whole text in the parameter preset box, e.g., $sys.func.APPEND($session.params.negative_products, credit score).
Why is this the case? I thought system functions were able to be used to dynamically change values in parameter presets and I have no idea why it just keeps on printing out the function as a string!
Any help would be much appreciated,
Vicky
Solved! Go to Solution.
Hey!
When referencing the parameter in my fulfilment I use:
$session.params.negative_products
I did figure a workaround yesterday. I realised when I define $session.params.negative_products within the 'Entry Fulfilment', 'Parameter Presets' section of the page the appending works:
1. Define empty list parameter in presets of the Entry Fulfilment, i.e., before I want to append to the list:
2. During a conditional route, append to the empty list using system functions in the parameter presets with the following command:
$sys.func.APPEND($session.params.negative_products, "credit score")
3. This then prints out the correct output when referencing $session.params.negative_products:
" , credit score"
I think my original issue was that when trying to define $session.params.negative_products as a 'isList' parameter, it wasn't actually generating a list per se. So, when I was trying to call it in $sys.func.APPEND(), the function wasn't reading the $session.params.negative_products as a list, and as a result, just printed out the system command.
Hope this helps other users who get faced with a similar issue!
Vicky
Hi!
Welcome to Google Cloud Community!
To properly replicate your use case, can you show how you called the parameter on your fulfillment?
Hey!
When referencing the parameter in my fulfilment I use:
$session.params.negative_products
I did figure a workaround yesterday. I realised when I define $session.params.negative_products within the 'Entry Fulfilment', 'Parameter Presets' section of the page the appending works:
1. Define empty list parameter in presets of the Entry Fulfilment, i.e., before I want to append to the list:
2. During a conditional route, append to the empty list using system functions in the parameter presets with the following command:
$sys.func.APPEND($session.params.negative_products, "credit score")
3. This then prints out the correct output when referencing $session.params.negative_products:
" , credit score"
I think my original issue was that when trying to define $session.params.negative_products as a 'isList' parameter, it wasn't actually generating a list per se. So, when I was trying to call it in $sys.func.APPEND(), the function wasn't reading the $session.params.negative_products as a list, and as a result, just printed out the system command.
Hope this helps other users who get faced with a similar issue!
Vicky