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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,528)