Pre-populating form with User details

Hi,

I am building a form for our internal users and because their details are already in the Active Directory / User object, I want their details to pre-populate the respective fields on the form. I would like the recipient of the form to be able to identify who submitted the form, from the submitted details.

Is this possible and if so how do I go about it? I would appreciate your help.

Many thanks.

Hi

If the details are in the user object, you need to create a relationship between your form object and your user object (many to one) and then you can put a hidden relation selector on the page, which defaults to logged in user. You can then use this relationship to copy over the details required (or just pick them up from the user object if you don’t want to duplicate the data).

Alternatively, you could use a page load event to add the relationship to the logged in user, and then pre-populate the fields.

Hi Kevin,

Thanks for getting back to me. I went with the option of using the relation selector and adding the desired fields onto the form but the fields are not pre-populating. I had to set a default (logged in user) on the relation selector for it to pre-populate. What am I doing wrong?

Many thanks.

I imagine the relation isn’t saved until the page is submitted. If you do the page load event to create the relation it might work. (I’m assuming the fields on your page are from the User object?)

The only issue here is if the page isn’t completed and submitted, you’ll end up with lots of records which are partly complete, so you may need a method to clean them up…

Thank you for your help. I will try and work with what you’ve given me.

Thanks.

Hi Kevin,

The fields are from the User object and I intend to set mandatory requirements on most of the fields on the form so it will be impossible to submit an incomplete form. That said, I am still not able to add the fields from the User object.

I would like to try the page load event option but I do not know how to. Can you give me some tips on that? Thanks.

Sorry, I may have misunderstood. To clarify, do you need to show the current logged in user, then add more information to the user table for them?

If so, then a rule to ‘add a relationship to logged in user’ on page load would be a good start, you should then be able to pull onto the page any fields from the user table that you need to populate and save.

Thanks. I’ll see if I can do this.

Hi Cecilia,

If you are still having problems, please feel free to direct message me and we can arrange a screenshare.

Best Wishes

Adam

Hi Adam,

Thanks for offering to help. How do I direct message you? I am new in this community and do not know my way about much. Also will sometime tomorrow be alright with you? Thanks.

Cecilia

Hi Adam,

I am afraid my message did not get to you because I got notified it was not sent. Sorry about that. In the meantime, I am looking into other alternatives and will get back to you when the need arises.

Thanks again for offering your help.

Kind regards,
Cecilia