Hello,
You can do something like this:
On your form add these code:
var userBelongsToGroup='false';
if (false
<PDM_LIST PREFIX="list" FACTORY="grpmem" WHERE="member = U'$cst.id'">
|| '$list.group' == "$args.group"
</PDM_LIST>
){
userBelongsToGroup='true';
}
if ( "$args.id" == 0 && userBelongsToGroup == 'true'){
<Add your field that should be mandatory (Make required = yes)>
} else {
<Add your field as not mandatory (Make required = no)>
}
Original Message:
Sent: Sep 22, 2023 09:43 AM
From: Sushovan Sinha
Subject: Restriction on field updation on a Request form based on requestor group membership during initial/opening a new request ticket
Scenario: Requestor from GroupA, while raising a Request ticket, a dropdown field should be mandatory to be filled when he is raising a new Request ticket whereas this field will not be mandatory or will appear as readonly for requestors not part of GroupA.
I am not able to fetch the group membership or create a PDM_IF condition based on the group membership. I tried below conditions:
<PDM_IF "$args.group" == "0xB76160306F08CD4DB707CD457A70FC77"> ---this is not working
------------
<PDM_IF "$cst.group.id" == "0xB76160306F08CD4DB707CD457A70FC77"> ---this is showing as incorrect condition
Please help on the same.
------------------------------
Sushovan Sinha
------------------------------