web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / on newform load popula...
Power Apps
Unanswered

on newform load populate lookup box with user().fullname

(0) ShareShare
ReportReport
Posted on by 35

Hi all, I'm working on a project for my local volunteer fire brigade where members can enter their availability, or availability for other members.  I have a few issue's I'm hoping to get some help with if possible

 

1. I'd like to populate the member lookup control (member.displayname) which is of sharepoint type person so this is already populated for the user, but they can still change it if they are entering data for another member.  I know I need to user  user().FullName  or User().Email but I can't find away to populate the lookup control when the newform is loaded.

 

2. A lot of the data is repetitive between entries, I would like to have a newform load, the user enters a date, and their availability and response times, then click a button for next day, the data is submitted, a new record is created with the previously entered data still set the same but with the date set to the previous date +1 day.

 

3. Members have asked to be able to create 7 records at once  so sunday through saturday, each being a seperate record in the sharepoint list.  Is this even possible on a single screen.

 

Also are there any good reference books or sites to run you through each of the controls and all the variables they have.

 

Many Thanks

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @AlanCampbell

     

    1. You can use the following function on the Default property to auto populate with ifnormation.

     

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:Concatenate("i:0#.f|membership|",User().Email),
     Department:"",
     DisplayName:User().DisplayName,
     Email:User().Mail,
     JobTitle:"",
     Picture:""
     }

     

    Also you can use Office 365 Users connector to get more information.

    in the Screen.OnVisible property set the following function

    Set(
     _UserProfile,
     Office365Users.MyProfile()
    )

    This will load the current User profile into a variable called _UserProfile.

     

    Then you can set the Default proeprty of the EditForm to:

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:Concatenate("i:0#.f|membership|",_UserProfile.Mail),
     Department:_UserProfile.Department,
     DisplayName:_UserProfile.DisplayName,
     Email:_UserProfile.Mail,
     JobTitle:_UserProfile.JobTitle,
     Picture:""
     }

    2.

    You can utilize Collections or Variables to set this up. Collect all info that user inputed into a collection and populate fields based on the collection plus some calculations (for example to add 1 day)

     

    3.

    Yes it is posible take a look at ForAll() function. You can create a Gallery which contains 7 items (Sunday to Saturday) users can enter info and then use ForAll() + Patch() to create 7 records at once.

     

    I am not aware of any books on PowerApps, they do have a documentation site and you can find a lot of info in it.

     

  • Meneghino Profile Picture
    6,949 on at

    Hi @AlanCampbell

    It looks as though @Anonymous has replied exhaustively.

    I would only add that the reference sites are these:

    https://powerapps.microsoft.com/en-us/tutorials/reference-properties/

    https://powerapps.microsoft.com/en-us/tutorials/formula-reference/

     

    I also have just started a blog here:

    http://baizini-it.com/blog/

    Any comments would be greatly appreciated.

  • AlanCampbell Profile Picture
    35 on at

    @MartynasJurkus thankyou for you detailed response, I had a little trouble, corrections are below for anyone else's reference

     

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:Concatenate("i:0#.f|membership|",User().Email),
     Department:"",
     DisplayName:User().FullName,
     Email:User().Email,
     JobTitle:"",
     Picture:""
     }

     

    The above pulls the user profile from Azure.

    Claims I believe is the result returned from the data pull and is then split into

    Department, displayname, E-mail, JobTitle and Picture 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard