cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
marcgiag
Level: Powered On

Auto Populating a text box with Office 365 display name who changed previous field & timestamp

I have a PowerApp, using a SharePoint list, where there are multiple tasks to be completed. As a specific task is completed (example Task1Completed switched from Off to On or On to Off) I want to populate Task1Owner with the Office 365 display name of who changed Task1Completed. Additionally I would like to record the DATE this change happened specifically for Task1Completed

 

2019-09-04_12-24-18.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Auto Populating a text box with Office 365 display name who changed previous field & timestamp

Hi @marcgiag ,

Do you want to auto-populate the values into the columns in your SP List when switch the Toggle control from Off to On?

Further, do you want to lock the Toggle control when the last person changed the Toggle control fro Off to On?

 

If you want to auto-populate the values into the columns in your SP List when switch the Toggle control from Off to On, I think the Patch function could achieve your needs.

I have made a test on  my side, please take a try with the following workaround:

Set the OnChange property of the Task1Complete Toggle control to following formula:

If(
Task1CompleteToggle.Value = true,
Patch( 'YourSPList', BrowseGallery1.Selected, { Task1Complete: true } )
)

Note: I assume that the Task1Complete is a Yes/No type column in your SP list to store the Toggle value. And you use a Gallery control in your app to list all avaiable records from your SP list.

 

Then please set the DisplayMode property fo the Task1Complete Toggle control to following:

If(
    ThisItem.Task1Complete = true,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Auto Populating a text box with Office 365 display name who changed previous field & timestamp

Hi @marcgiag ,

Do you want to auto-populate the Task1Owner Text Input box and Changed Date Input box based on the Toggle control (switch Off to On)?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

I assume that when you switch the Toggle control from Off to On, the corresponding Task would be marked as Completed. Please set the Default property of the Task1Owner Text Input box to following:

If(
   Task1Toggle.Value = true,          /* <-  Task1Toggle represents the Task1Complete Toggle control in your app */
   User().FullName
)

or

If(
   Task1Toggle.Value = true,          /* <-  Task1Toggle represents the Task1Complete Toggle control in your app */
   Office365Users.MyProfile().DisplayName               /* <-- You need to add Office 365 Users connector as data source in your app firstly */
)

 

set the Default property of the Changed Date Text Input box to following:

If(
   Task1Toggle.Value = true,          /* <- Task1Toggle represents the Task1Complete Toggle control in your app */
   Now() 
)

Please take a tyy with above solution, then check if the issue is solved.

 

Best egards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
marcgiag
Level: Powered On

Re: Auto Populating a text box with Office 365 display name who changed previous field & timestamp

 
marcgiag
Level: Powered On

Re: Auto Populating a text box with Office 365 display name who changed previous field & timestamp

@v-xida-msft ....  I have the 2 fields populating the data I wanted, but...

When I toggle to "True" it doesnt autofill the fields until I SUBMIT (not populated) and select Edit (populates), then it repopulates everytime the it is edited (could be a different date or person). I need it to LOCK in the last person who changed task Completed to True.

 

here is how we did it in infopath

 

 

2019-09-05_9-33-47.png2019-09-05_9-27-59.png

Community Support Team
Community Support Team

Re: Auto Populating a text box with Office 365 display name who changed previous field & timestamp

Hi @marcgiag ,

Do you want to auto-populate the values into the columns in your SP List when switch the Toggle control from Off to On?

Further, do you want to lock the Toggle control when the last person changed the Toggle control fro Off to On?

 

If you want to auto-populate the values into the columns in your SP List when switch the Toggle control from Off to On, I think the Patch function could achieve your needs.

I have made a test on  my side, please take a try with the following workaround:

Set the OnChange property of the Task1Complete Toggle control to following formula:

If(
Task1CompleteToggle.Value = true,
Patch( 'YourSPList', BrowseGallery1.Selected, { Task1Complete: true } )
)

Note: I assume that the Task1Complete is a Yes/No type column in your SP list to store the Toggle value. And you use a Gallery control in your app to list all avaiable records from your SP list.

 

Then please set the DisplayMode property fo the Task1Complete Toggle control to following:

If(
    ThisItem.Task1Complete = true,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 164 members 5,900 guests
Please welcome our newest community members: