cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Automatically assign current User ID/email to Sharelist list

Hi, 

 

I would like to assign the current user email/name to a comboBox of SharePoint List with 'Person and Group' type

I tried the below command, but it returns error.

 

May I know how can I assign the current user id to that field automatically?

 

Q25a.PNG

 

Thanks in advance


Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Automatically assign current User ID/email to Sharelist list

Hi @samsam ,

Do you mean you want to set current user to the staff name field automatically?

You have to modify the DefaultSelectedItems property of combo box as below:

 

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

 

Sik

View solution in original post

3 REPLIES 3
Highlighted
Power Participant
Power Participant

Re: Automatically assign current User ID/email to Sharelist list

@samsam 

We believe you get this error because Choices is not looking for a condition, it is looking for a column. In other words, looking for records where the data source StaffName column is equal to the current user full name is probably not a valid type of column, that needs to likely be put not as direct parameter of Choices. but rather be put somewhere else.

Highlighted
Community Support
Community Support

Re: Automatically assign current User ID/email to Sharelist list

Hi @samsam ,

Do you mean you want to set current user to the staff name field automatically?

You have to modify the DefaultSelectedItems property of combo box as below:

 

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

 

Sik

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Automatically assign current User ID/email to Sharelist list

@v-siky-msft Thank you ~ it works perfectly

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,962)