Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This may seems to be a basic question, but, we have a table as Region Table -
REGION | UNAME | UGROUP | |
R1 | abc@123.com | abc | INFO |
R2 | abc1@123.com | abc1 | TEST |
R3 | abc2@123.com | abc2 | TEST2 |
and flag table as -
UGROUP | RFLAG |
INFO | 0 |
TEST | 1 |
TEST2 | 1 |
We have a requirement, where we want to set default value as REGION, where UNAME is logged in user.
If the RFLAG for the User Group is 0, then default will not be set.
We are using these configuration in the Section Access Hidden script, so, I have tried with below expression in Select in Field of REGION as -
=if(sum(RFLAG)=1,
MAXSTRING({<SubField(OSUser(),'\',2)=UNAME}>}REGION)
)
But it throws an error.
Please assist.
Regards,
MK
try switching the condition otherway round
=if(sum(RFLAG)=1,MAXSTRING({<UNAME={"$(=SubField(OSUser(),'\',2))"}}>}REGION))
HTH
Sasi
share your desired output as well
try switching the condition otherway round
=if(sum(RFLAG)=1,MAXSTRING({<UNAME={"$(=SubField(OSUser(),'\',2))"}}>}REGION))
HTH
Sasi
Thanks Sasidhar,
I have just modified the expression, as there was one extra bracket which was coming -
=MAXSTRING({<UNAME={"$(=SubField(OSUser(),'\',2))"}>}REGION)
Thanks again.
Regards,
MK