cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canadiansal
Helper V
Helper V

Default Field Value

 

So I have an App that pulls data from a Sharepoint list.

One of the Fields - "Owner" is a Person or Group type. So this translates to Drop Down list of Email Addresses in my Form.

Canadiansal_0-1611604837926.png

I would like for the field in the Form to be Automatically populated with the Email Address of the User. 

My Form looks like this. The current value in this field is: MainGallery.Selected.Owner. So its pulling from a Gallery which is based on the SP list.

Canadiansal_1-1611604964376.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Canadiansal 

I am assuming this is a ComboBox in your Form so, set the DefaultSelectedItems property of the ComboBox to the following:

{
      Claims:"i:0#.f|membership|" & Lower(User().Email), 
      Department:"", 
      DisplayName:User().Email, 
      Email:User().Email, 
      JobTitle:".", 
      Picture:"."
}

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Canadiansal 

I am assuming this is a ComboBox in your Form so, set the DefaultSelectedItems property of the ComboBox to the following:

{
      Claims:"i:0#.f|membership|" & Lower(User().Email), 
      Department:"", 
      DisplayName:User().Email, 
      Email:User().Email, 
      JobTitle:".", 
      Picture:"."
}

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you! You make it look easy!

RandyHayes
Super User
Super User

@Canadiansal 

No problem!  Yes...Keep it Easy all the time and PowerApps will be your friend!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,952)