hcl-bot
December 17, 2010, 1:21am
1
ive been working on this code for so long:
@SetField (“fc”;@Prompt ([OkCancelList]; “Entry”; “Select Financial Counsel”; “”; @DbLookup ( “” : “NoCache” ; “” : “” ; “Profile” ; “Financial Counsel”;“name”)))
i have to replace the key “Financial Counsel” by @ismember (“[FC]”;@userroles ); . is that posible to place it as KEY??
how can i work on this?? thanks…
hcl-bot
December 17, 2010, 3:23pm
2
Subject: Possible
Break it down like this, perhaps:
'is the role of the user? returns 1=yes, 0=no
role := @IsMember (“[roleX]”; @Userroles );
'set a key based on rol
lukey := @If (role = 1; “key1”; “key2”);
'get the dblookup vals for the list, based on the key
luvals := @DbLookup ( “” : “NoCache” ; “” : “” ; “Profile” ; key ;“name”);
'set the field with the prompted val
FIELD fc := @Prompt ([OkCancelList]; “Entry”; “Select Financial Counsel”; luvals; “” ))
hcl-bot
December 17, 2010, 5:39am
3
Subject: Userroles
What exactly are you trying to do?
@ismember (“[fc]”;@userroles ) will return 1 or 0, so if you just replace that in your lookup it will try to look up docs in the view categorised by that value. I can’t imagine that’s what you’re trying to do