cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Changing data table with button

I'm modifying the support ticket template for personal use. I'm 99% there but i've got 1 problem left.

 

I want to be able to have a button that when selected changes the ticket assignment to the current user punched in.

 

I know enough to know the datatable i want is "Tickets", the column in that table is "assignedto" and i want to use "user().fullname" but I cant figure out how to make it change the data.

 

Additionall i'd like it to then submit the form and navigate back to the homepage

 

Thanks in advance for any help

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Level 10

Re: Changing data table with button

Hi @Anonymous

 

The simple answer is to set change the Default property of the control that displays assignedto in your form.

Presumably the column is a text type column and the Default property is currently set to something like: XXX.assignedto

 

What you do then is create your button, and set its OnSelect property to:

UpdateContext({UseCurrentUser: !UseCurrentUser})

Then change the Default property of the control I described above to this:

If(UseCurrentUser, User().FullName, XXX.assignedto)

Please let me know how you get on.

View solution in original post

2 REPLIES 2
Meneghino
Level 10

Re: Changing data table with button

Hi @Anonymous

 

The simple answer is to set change the Default property of the control that displays assignedto in your form.

Presumably the column is a text type column and the Default property is currently set to something like: XXX.assignedto

 

What you do then is create your button, and set its OnSelect property to:

UpdateContext({UseCurrentUser: !UseCurrentUser})

Then change the Default property of the control I described above to this:

If(UseCurrentUser, User().FullName, XXX.assignedto)

Please let me know how you get on.

View solution in original post

Anonymous
Not applicable

Re: Changing data table with button

that essentially turned the button into a toggle. So when pressed it changes the data to current user, when pressed again it changes it back

 

I added "SubmitForm(TicketDetailsForm)" to the end to make it work the want i'd like. so that woked perfectly!

 

Thanks again!

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: 229 members 5,591 guests
Please welcome our newest community members: