cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
moltenlava
Frequent Visitor

Set field powerapps issue

Hi,

 

I am fairly new to PowerApps so i dont know what im missing here. I have a Powerapp that links to a sharepoint list. The first page gives the user three buttons/options which is to "book an innovation workshop", "book a consulting workshop" and so on. When they click each button it takes them to a page where specific columns from my sharepoint list show up (ones related to each workshop type). 

 

There is a field in my sharepoint list called "Type of Workshop". To remove duplication, i want the "type of workshop" field to be automatically populated with whatever button type they clicked.

 

I have tried Patch, Microsoft Flows, UpdateContext and i still can't seem to get it right.

 

Any help will be appreciated!! 🙂 

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

I have found a solution!

 

I worked around it by instead setting the data card as a default value and then hiding it from the edit form

 

I set the data card default.selected as:

 

If(EditForm1.Mode = New, {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"w"}, 
Parent.Default)

 With W being the drop down i want it to be 🙂

 

Thanks for your help anyway!

View solution in original post

7 REPLIES 7
KickingApps
Skilled Sharer
Skilled Sharer

If you have 3 buttons, do something along the lines of:

Button1
OnSelect = UpdateContext({ThisButton:Button1.Text})

Button2
OnSelect = UpdateContext({ThisButton:Button2.Text})

Button3
OnSelect = UpdateContext({ThisButton:Button3.Text})

Set the text property of field you want to auto populate with:

ThisButton

Hi Kicking Apps,

 

Thanks for the response! I'm fairly new to PowerApps so please correct me, but i put in your formula in my first button and unsure what you mean by update text property of the field? How would i go about that?

 

Attached pictures showing my attempted formula for the first button and what field i want updating:

@moltenlava Check out the attached to see if it will work for you.  Instead of 3 buttons, I used a gallery with one button and name the buttons from the collection (refer to the OnStart sim button).

 

I added a dropdown control that provides the user the choices from the collection but will default to whatever is selected from the gallery.  

Hi Kicking apps,

 

Any way this can be sent as an image? I don't have the desktop app so the file wont open properly.

 

Thank you!

Did you download the file?  If so, go to create.powerapps.com and browse for the downloaded file.  Select the file and it should open in the PowerApps web browser.

I have opened it - thanks!

Will this solution work if the dropdown is a SharePoint field?

Also if the onstart button is on page 1 and the three buttons in the gallery on page 2 for example?

I need the formatting of my screens to be the same as the image.

 

Sorry about the confusion!

I have found a solution!

 

I worked around it by instead setting the data card as a default value and then hiding it from the edit form

 

I set the data card default.selected as:

 

If(EditForm1.Mode = New, {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"w"}, 
Parent.Default)

 With W being the drop down i want it to be 🙂

 

Thanks for your help anyway!

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,837)