Hi All,
I am new to powerapps need help with below scenario
i have an combobox with ID names, Textbox, Dropdown, button
from combobox i will be selecting multiple IDs and fill textfield and dropdown and click save button, But in sharepoint againt each row the ID , textbox value and dropdown value to be saved.
Ex: if i have selected 4 Ids from combobox then below output should be saved in sharepoint
ID Textbox Dropdown
c1234 abc xyz
c2334 abc xyz
c3455 abc xyz
c4555 abc xyz
Solved! Go to Solution.
Hi @Vinith ,
Could you please share a bit more about the error message that you faced with the formula I provided?
Could you please show more details about the data structure of your SP List?
Based on the needs that you mentioned, I think the formula I provided above could achieve your needs. In addition, if the Dropdown column that you mentioned is a Choice type column in your SP List, please modify your formula as below:
Set the OnSelect property of the "Patch" button to following:
ForAll( ComboBox1.SelectedItems, Patch( 'YourSPList', /* <-- '20190325_case13' represents my SP list data source */ Defaults('YourSPList'), { IDColumn: Value, /* <-- Value property is from the result the ComboBox1.SelectedItems formula returns */ TextBoxColumn: TextInput1.Text, DropdownColumn: {
Value: Dropdown1.Selected.Value /* <-- Modify your formula here */
} } ) )
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @Vinith ,
Could you please share a bit more about your scenario?
Do you want to create separated row for each ID selected within the ComboBox into your SP list along with same Textbox value and Dropdown value?
How do you submit the data into your SP list? Using SubmitForm() function or Patch function?
I suppose that you want to create separated row for each ID selected within the ComboBox into your SP list along with same Textbox value and Dropdown value, is it true?
Based on the needs that you mentioned, I think the SubmitForm function could not achieve your needs. As an alternative solution, I think the combination of ForAll function and Patch function could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Patch" button to following:
ForAll( ComboBox1.SelectedItems, Patch( '20190325_case13', /* <-- '20190325_case13' represents my SP list data source */ Defaults('20190325_case13'), { Title: Value, ProjectName: TextInput1.Text, ProjectTitle: Dropdown1.Selected.Value } ) )
On your side, you may type following:
ForAll( ComboBox1.SelectedItems, Patch( 'YourSPList', /* <-- '20190325_case13' represents my SP list data source */ Defaults('YourSPList'), { IDColumn: Value, /* <-- Value property is from the result the ComboBox1.SelectedItems formula returns */ TextBoxColumn: TextInput1.Text, DropdownColumn: Dropdown1.Selected.Value } ) )
Note: The IDColumn, TextBoxColumn and DropdownColumn are all columns in your SP List. IDColumn used to store the ID value selected from the ComboBox (ComboBox1). TextInput1 represents the TextInput box in your app, the Dropdown1 represents the Dropdown box in your app.
Please take a try with above solution, check if the issue is solved.
More details about the Patch function and ForAll function, please check the following article:
Patch function, ForAll function
Best regards,
Thanks, @v-xida-msft
Do you want to create separated row for each ID selected within the ComboBox into your SP list along with same Textbox value and Dropdown value?
Yes i need to save in each seperated row with each id selected in combobox but with same textbox and dropdown value selected.
Using SubmitForm() function or Patch function?
both can be used not any particular
It seems there is an error in the code provided, could you please try to save in your sharepoint and provide the screenshots.
Thanks for your help in advance,
Hi @Vinith ,
Could you please share a bit more about the error message that you faced with the formula I provided?
Could you please show more details about the data structure of your SP List?
Based on the needs that you mentioned, I think the formula I provided above could achieve your needs. In addition, if the Dropdown column that you mentioned is a Choice type column in your SP List, please modify your formula as below:
Set the OnSelect property of the "Patch" button to following:
ForAll( ComboBox1.SelectedItems, Patch( 'YourSPList', /* <-- '20190325_case13' represents my SP list data source */ Defaults('YourSPList'), { IDColumn: Value, /* <-- Value property is from the result the ComboBox1.SelectedItems formula returns */ TextBoxColumn: TextInput1.Text, DropdownColumn: {
Value: Dropdown1.Selected.Value /* <-- Modify your formula here */
} } ) )
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @Vinith ,
Have you taken a try with the modified formula I provided?
Have you solved your problem?
If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
Hi,
I havv tried the same formula which you have mentioned and I am getting the error
the type of the argument qualification doenot match the exprected type Record found type 'Table'.
Please find the below formula
ForAll(ComboBox8.SelectedItems,Patch(Employee,Defaults(Employee),{qualification:ComboBox8.SelectedItems.qualification,Title:txtName.Text,xyz:txtdesig.Text});
You have mentioned value and i have used :ComboBox8.SelectedItems.qualification
Can you Pleass let me know what is the Value correpsonds to
Regards
Srinivas
User | Count |
---|---|
133 | |
132 | |
97 | |
75 | |
74 |
User | Count |
---|---|
206 | |
196 | |
70 | |
60 | |
52 |