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

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!! Smiley Happy 

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
moltenlava
Level: Powered On

Re: Set field powerapps issue

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 Smiley Happy

 

Thanks for your help anyway!

7 REPLIES 7
KickingApps
Level 8

Re: Set field powerapps issue

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

moltenlava
Level: Powered On

Re: Set field powerapps issue

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:

KickingApps
Level 8

Re: Set field powerapps issue

@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.  

moltenlava
Level: Powered On

Re: Set field powerapps issue

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!

KickingApps
Level 8

Re: Set field powerapps issue

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.

moltenlava
Level: Powered On

Re: Set field powerapps issue

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!

moltenlava
Level: Powered On

Re: Set field powerapps issue

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 Smiley Happy

 

Thanks for your help anyway!

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

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