I'm trying to recreate an old infopath based process in PowerApps and I've one last hurdle.
The selection of a Choice field (requested status) in the SharePoint list from "New" to "Finished" is required when the user submits the form.
I can't figure out how to do this in PowerApps.
I've tried different variations of Patch or Update with no sucess yet any ideas?
Thanks in advance!
Solved! Go to Solution.
In your Patch Statment, you will need to use the OData Type Request similar to below
Patch(TestList,Defaults(TestList),
{
Title:"Test Title",
Gender:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Value:"Male",Id:1}
})
Hi @Conor
Not sure what you are strugling with exactly?
If you want to update a record in your datasource, use Patch() function.
Something like this:
Patch( 'YourDataSource', Gallery1.Selected, Requested_Status = Dropdown.Selected.Value )
If you give us more info on what you are trying to achieve we can give you more direct advice.
Sorry that question was a little misleading on re-reading.
The form in question when it is submitted needs to be maked as finished. Previously in infopath I had a rule to change the SharePoint column (drop down) from "New" to "Finished".
Essentially I want to set the value of the drop down column in SharePoint when the PowerApp is submitted, I don't want to take the value of it's associated PowerApps Dropdown control or indeed even have that dropdown visible on the PowerApp.
Bump!
Hi @Conor
I think you better look for making your own form to submit record into datasource. In my opinion the prebuild forms are for simple editing and adding records into datasorce and I personally wouldn't recommend them to use by anyone and by any circumstances specially to someone what just started to work with PA. You can do whatever you want by creating your own form and using patch (or other functions) to update or create record into datasource
@Sienna I'm using a Patch function for testing and a custom form. I'm having difficulty with the syntax.
If I have a SharePoint list called TestList with the following fields:
Title - Single Line of text
Gender - Choice (Choose either Male or Female)
I can patch the title field fine with the following syntax:
Patch(TestList,Defaults(TestList),{Title:"Test Title"})
I cannot figure out the syntax for patching the choice field. It won't accept a string like the Title field even if it matchs a valid selection.
** Edit fixed typo **
*duplicate post*
In your Patch Statment, you will need to use the OData Type Request similar to below
Patch(TestList,Defaults(TestList),
{
Title:"Test Title",
Gender:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Value:"Male",Id:1}
})
I had seen that syntax before but didn't know to use it here. Thank you!
Depending on the Order of your Choice Field e.g. Male / Female or Femal / Male, you may need to change the ID Value.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
201 | |
71 | |
49 | |
43 | |
30 |
User | Count |
---|---|
255 | |
121 | |
86 | |
84 | |
84 |