I have the current code in my "OnSelect" for a button and everything works just as it should.
Patch(CI_Project_Repository,Defaults(CI_Project_Repository),IntakeForm.Updates,
{
BusinessSegment: Dropdown1.Selected.Value,
BusinessSegmentDetail: ComboBox1.Selected.Value
}
);
If(!IsEmpty(Errors(CI_Project_Repository)),Notify("Submission Failed, Please Try Again",NotificationType.Error),
Navigate(NextStepsScreen);
)
)
However, my requirements changed and ComboBox1 is now a multi-select dropdown and I want to patch all the selections to my SharePoint List. How do I do that?
Solved! Go to Solution.
Hi @mkusler ,
You really have two choices with a multi-select combo box
The first is my preferred option generally as the control is designed to work with this field type.
The second option works, but with an annoying glitch - if the user wants to edit the content of the box (after the items have been initially selected and saved), they need to delete all existing content and re-select the new content they need.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @mkusler ,
This should work
Patch(
CI_Project_Repository,
Defaults(CI_Project_Repository),
IntakeForm.Updates,
{
BusinessSegment: Dropdown1.Selected.Value,
BusinessSegmentDetail:
ForAll(
ComboBox1.SelectedItems As aPatch,
{Value: aPatch.Value}
)
}
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Thank you for the response. I used that exactly and am still getting this error.
The type of this argument 'BusinessSegmentDetail' does not match expected type 'Text'. Found type 'Record'
Do I have something wrong?
@mkusler ,
Please see amended post - problem with engaging keyboard before brain is properly in gear . . .
I am still getting an error, but this time it says:
The type of this argument 'BusinessSegmentDetail' does not match expected type 'Text'. Found type 'Table'
Is there a setting somewhere that I may be overlooking?
@mkusler ,
What type of field is BusinessSegmentDetail ? The code is valid if used with a multi-choice field.
I had it set as a "Single Line of Text". The reason being is that I have two dropdowns that are not part of my form.
The first being Business Segment with the following Items:
["Choose Business Segment", "******* Gaming (Land-Based)","Mobile Gaming (Online)"]
The second ComboBox is Business Segment Detail with the following Items:
If(Dropdown1.Selected.Value = "Choose Business Segment", ["Choose Business Segment"],
If(Dropdown1.Selected.Value = "******* Gaming (Land-Based)", ["","*******", "*******", "*******", "*******", "*******", "Customer Experience Solutions (CSX)"],
If(Dropdown1.Selected.Value = "Mobile Gaming (Online)", ["","*******", "*******"])))
I'm thinking now that it may just be easier to create a second form, create the proper choice columns in SharePoint and simply update both forms at the same time and abandon patching the dropdowns I created in PowerApps back to SharePoint.
Hi @mkusler ,
You really have two choices with a multi-select combo box
The first is my preferred option generally as the control is designed to work with this field type.
The second option works, but with an annoying glitch - if the user wants to edit the content of the box (after the items have been initially selected and saved), they need to delete all existing content and re-select the new content they need.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
124 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
215 | |
178 | |
140 | |
106 | |
83 |