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

Can't figure out changing Combobox value

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.

 

leaver.png

 

I've tried different variations of Patch or Update with no sucess yet any ideas?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

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}
})

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

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.

Conor
Frequent Visitor

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.

 

 

 

 

 

 

Conor
Frequent Visitor

Bump!

Sienna
Memorable Member
Memorable Member

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

Conor
Frequent Visitor

@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

GenderChoice (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 **

 

Conor
Frequent Visitor

 

*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}
})

View solution in original post

Conor
Frequent Visitor

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,578)