cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Patch Function only Patches ComboBox's First value to the Data Source even if other value is selected

 Hey PowerApps gurus!

 

Need some help with a function, I am working on a production tracker to for operations.

 

This is the Patch function I am using - I need help with the "Status Decision" Combobox Selection

Patch(Table1,First(Filter(Table1,ID=DataCardValue73.Text)),{StartTime:LabelStart_UW_1.Text,PauseTime:LabelPauseStart_UW_1.Text,TotalPauseTime:LabelPauseTotal_UW_1.Text+DataCardValue28.Text,Comments:DataCardValue37.Text,Status_x0020_Decision:First(ConditionsScreenComboBoxItems.Item).Item})

 

- this was challenging because I kept getting an error that said something like: 'Expecting text value; found Table' - 

 

Screenshot 2020-10-07 115958.png

The ComboBox values are feeding from SPO list

Patch funtion is patching to OneDrive File

Gallery updates based on Patched values from OneDrive

There are no Errors being thrown.

 

The next step here is I created a Label that Matches the Review Decision to a Review Status column so based on the Review Decision, the Review Status will be either Complete or Pending. Just want to make sure this isnt affecting other column.

 

Any help would be fantastic!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that:
1)the combo box display data from sharepoint list;

2)you want to use patch function to update excel in one drive;

3)the combo box allows multiple selections?

Could you tell me:

1)the formula in the combo box's Items?

2)the Status Decision field data type in sharepoint list?

3)what is combo box for Status Decision named?

4)how do you want to connect with multiple selections? by using ";"?

 

I assume that:

1)combo box's Items is : sharepointlistname

2)the Status Decision field data type in sharepoint list is text

3)connect with multiple selections by using ";"

 

If so, you should use formula like this to update:

 

Patch(Table1,First(Filter(Table1,ID=DataCardValue73.Text)),{StartTime:LabelStart_UW_1.Text,PauseTime:LabelPauseStart_UW_1.Text,TotalPauseTime:LabelPauseTotal_UW_1.Text+DataCardValue28.Text,Comments:DataCardValue37.Text,
Status_x0020_Decision:Concat(comboboxname.SelectedItems,Status_x0020_Decision&";")
}

 

 //comboboxname.SelectedItems represents all the selected items of the combo box.

Use concat function to transfer table to text.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that:
1)the combo box display data from sharepoint list;

2)you want to use patch function to update excel in one drive;

3)the combo box allows multiple selections?

Could you tell me:

1)the formula in the combo box's Items?

2)the Status Decision field data type in sharepoint list?

3)what is combo box for Status Decision named?

4)how do you want to connect with multiple selections? by using ";"?

 

I assume that:

1)combo box's Items is : sharepointlistname

2)the Status Decision field data type in sharepoint list is text

3)connect with multiple selections by using ";"

 

If so, you should use formula like this to update:

 

Patch(Table1,First(Filter(Table1,ID=DataCardValue73.Text)),{StartTime:LabelStart_UW_1.Text,PauseTime:LabelPauseStart_UW_1.Text,TotalPauseTime:LabelPauseTotal_UW_1.Text+DataCardValue28.Text,Comments:DataCardValue37.Text,
Status_x0020_Decision:Concat(comboboxname.SelectedItems,Status_x0020_Decision&";")
}

 

 //comboboxname.SelectedItems represents all the selected items of the combo box.

Use concat function to transfer table to text.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,589)