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
Super User II
Super User II

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,963)