You are viewing limited content. For full access, please sign in.

Question

Question

How to assign field value based on users login

asked on August 6, 2021

Hi,

I wanted to default a field value called "Property" based on username (Initiator).

In my Scenario let say i have 3 properties (Property1, Property2 and Property3)

and 3 users (A,B and C)

Let say when initiator A start the Form, Property1 is defaulted in field "Property"

similarly when initiator B start the Form, Property2 is defaulted in field "Property"

and when initiator C start the Form, Property3 is defaulted in field "Property"

Any idea how can i achieve the same.

Thanks

Arvind

 

0 0

Replies

replied on August 6, 2021

The best way to do this is with a database lookup. If you have a table with 

User | Property1 | Property2 | Property3

you can build a form with your User and Property fields. 

Set the default value for user to be currentuser, then add a lookup against your database "When user field matches the user column in the db, fill property1 with the property1 column, property2 with the property 2 column, and property3 with the property3 column. This way, you can easily add users and update properties in the database and the form will continue to work. 

For a limited amount of users and properties, you COULD do this with if statements in the calculation field, but that would get hard to manage very quickly. You'd have to go into the property1 field and say if(user=userA,"someValue",if(user=userB,"otherValue",if(user=userC,"thirdValue",...)))
and do that for each property field. 

1 0
replied on August 8, 2021

Thanks Jared,

I m currently doing it through database lookup and was figuring out for other possibilities.

I wanted to avoid a user database since i m managing 8 properties and users turnover is high.

 

Regards,

Arvind

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.