简体   繁体   中英

Sharepoint Infopath Autofill fields

I have a problem in autofilling data. We have just moved from SP on-premise to Office365. In on-premise data we have used following instructions: ****substring-after(userName(),"\\") query using user info list set field value DisplayName=concat("i:0#w.domain|username","\\").**** se t field values of email and phone number. But it do not work in Office 365. I have used just userName() function to autofill username but how do I get other two fields as follows. substring-after(userName(),"\\") query using user info list **set field value DisplayName=userName(). set field values of email and phone. Thanks in Advance

I'm working on InfoPath on O365, and I am able to create a data connection to the User Information List. Please check image to see how it looks like:

Connection to UIL

Then on Form Load, I create a simple Rule that queries data using that connection. It's straightforward, in this rule run the following actions in order:

  1. Set field's value: Name = userName()
  2. Query using a data connection: User Information List (name of your connection)
  3. Set field's value: email = EMail (and repeat this for rest of attributes)

The idea of this connection is simple, you set the "queryFields" as needed (in our case, query data where Name = userName()) , then do the query, then collect your data..that's it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM