I have a dropdown field where we need to default values based on couple of conditions

I used if() to check the condition in Value() parameter of dropdown which is working fine from front end, but the value is not saved when i use the same logic in SaveInto() parameter of dropdown.

Logic used in Value() parameter: 

if(
and(
ri!eventType = cons!INS_INT_EVENT_TYPE_ID_ANZ_ARREARS,
ri!policyNo = cons!INS_TXT_MULTIPLE
),
"Contact Centre Outbound",
if(
and(
ri!eventType = cons!INS_INT_EVENT_TYPE_ID_ANZ_ARREARS,
ri!policyNo = cons!INS_TXT_SINGLE
),
"Contact Centre Inbound",
index(ri!application, "incomingSource", null)
),

)

Logic used in SaveInto() parameter: 

{
if(
and(
ri!eventType = cons!INS_INT_EVENT_TYPE_ID_ANZ_ARREARS,
ri!policyNo = cons!INS_TXT_MULTIPLE
),
a!save(
ri!application.incomingSource,
"Contact Centre Outbound"
),
if(
and(
ri!eventType = cons!INS_INT_EVENT_TYPE_ID_ANZ_ARREARS,
ri!policyNo = cons!INS_TXT_SINGLE
),
a!save(
ri!application.incomingSource,
"Contact Centre Inbound"
),
ri!application.incomingSource
),

)
},

Text marked in yellow is my first condition and text marked in green is my second condition. Both conditions are being correctly displayed but not being saved. Please let me know, where am i going wrong. Thanks in advance!

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data