
Hi,
Can anyone help me to achieve this requirement? I have a text fields named InternalStatus and RetriggerApproval. I want to set the RetriggerApproval field using OnSelect button when:
If
InternalStatus = "MR_ImmManager", set RetriggerApproval text to "RS_to_ImmManager"
ElseIf
InternalStatus = "MR_FinanceManager", set RetriggerApproval text to "RS_to_FinanceManager"
ElseIf
InternalStatus = "MR_ITManager", set RetriggerApproval text to "RS_to_ITManager"
ElseIf
InternalStatus = "MR_GroupHead", set RetriggerApproval text to "RS_to_GroupHead"
EndIf.
Thanks in Advance. Main goal is to re-route again the approval to the one who rejected once modified by the end user.
Hi @jaina,
You can use a Switch statement to achieve this.
This will populate the RetriggerApproval Text Input control as soon as InternalStatus is equal to one of your values.
Place this code in the Default property of your RetriggerApproval
Switch(InternalStatus.Text,
"MR_ImmManager", "RS_to_ImmManager",
"MR_FinanceManager", "RS_to_FinanceManager",
"MR_ITManager", "RS_to_ITManager",
"MR_GroupHead", "RS_to_GroupHead",
"", ""
)
To make the RetriggerApproval get populated by a button, put this on the OnSelect property:
Set(varPopulateText,
Switch(InternalStatus.Text,
"MR_ImmManager", "RS_to_ImmManager",
"MR_FinanceManager", "RS_to_FinanceManager",
"MR_ITManager", "RS_to_ITManager",
"MR_GroupHead", "RS_to_GroupHead",
"", ""
)
)
Then for your Default property of your RetriggerApproval, use: varPopulateText
Please tick Accept as solution if the answer is useful.
Thanks,