pbsk63
Novice

Conditionally set the default value for a People field

In my form, I want a People field to default to CurrentUser if it is being filled out by the employee but default to blank if it is filled out by a manager (on behalf of the employee). I am passing a query string of 'E' or 'M' to a text field (EmpType) when the form is opened. I know this piece is working because I created a calculated field and set the default value as fn-If(EmpType=='E', 'yes', 'no') and tested with both values.

 

It seems I should be able to go into the formula builder for the People field's default value and enter something like:

fn-If(EmpType == 'E', CurrentUser, ''), where I'm using the empty quotes at the end to signify a null value, but I haven't gotten anything to work.

In fact, just as a test, I used:

fn-If(EmpType == 'E', CurrentUser, CurrentUser), in which case it should have displayed CurrentUser regardless of whether it evaluated to true or false, but it didn't.

 

So, is it possible to use fn-If (or any other method of evaluating a condition) to set a People field? Any suggestions would be greatly appreciated.

0 Kudos
Reply