HI
I cannot get it to patch selected data including attachment in the record?
I have a gallery that is pickup data from submitted forms, the category display is a selected choice in SP list.
onselect patch button -
Patch('list', Defaults('list'), {Category :Category1.selected.value, Description:TextInputDes.Text}) or
{Category :Category1.selected.Text
also not working?
Solved! Go to Solution.
Hi @bbsin,
Sorry for the late reply, have you solved your problem?
If you just want to copy one record once you click the copy button in order to patch the selected record including the attachment, please try as below.
I'll consolidate all the information you gave me before and reproduce your process in full.
1).Make a Group by taking all the input controls within your pop-up window.
Select (Ctrl + Click) all the input controls those you want to make a Group. Click on 3 dot ellipses (…) and then Group as shown below.
2). Select the group and set its Visible property as
DisplayPopup // This is a variable
3). Set your copy icon OnSelect property as
Set(DisplayPopup, true )
4). Set the Cancel button OnSelect property as
Set(DisplayPopup, false )
5). Set the OK button OnSelect property as
Patch(
DefaultSelectedItem,
Gallery8.Selected,
{
Title: TextInput7.Text,
CH: {Value: TextInput8.Text}
},
EditForm2.Updates
);
Set(
DisplayPopup,
false
)
6). Set the Item property of the EditForm2 as
Gallery8.Selected
Note that EditForm2 is the FormEditQ in your scenario, CH is a Choice column in my SP list. Every time you select a record in the gallery, the FormEditQ will be populated with this selected record, and to meet your need that patch a attachment within the record, you could refer to the FormEditQ.Updates to catch the attachment.
Please check the attach Gif for details.
Regards,
Qi
Hi @bbsin,
Based on the issue that you mentioned, do you want to patch a Dropdown selected item to a Choice field in SP list?
Could you please tell me that Category1 is a Dropdown or a Combo Box?
If Category1 is a Combo Box and the corresponding column is a Choice type, please consider modifying your formula as below:
Patch('list', Defaults('list'),{Category :{Value:Category1.Selected.Value}, Description:TextInputDes.Text})
Check if it could help you.
Regards,
Qi
Hi @bbsin,
Do you mean that you want to patch the text box value to a Choice field in your SP list?
Could you please:
I am so confused that what do you want to achieve? Since the Gallery fetch data from submitted forms, then the data within the Gallery should have been saved to SP list successfully already. Or if you want to create a duplicated table using all the records within the Gallery and patch the duplicated table to another list?
If you want to create a repeated table, please try as below:
ForAll(
Gallery7.AllItems,
Patch(
SPList,
Defaults(SPList),
{
Description: TextInputDes.Text,
Category: {Value: TextInputCate.Text}
}
)
)
Note that TextInputCate is the text box corresponding to the Category in your Gallery.
If this formula could not solve your problem, please provide more details about your scenario because I could not imagine what you have met in your own scenario.
Regarda,
Qi
hi v-qiaqi-msft,
yes, I want to duplicate the row of data , how to also patch the attachment that is in the record? or it cannot be done?
Also how to have the dialog box closed after it is submitted? Thanks
Hi @bbsin,
Could you please answer my questions one by one instead of one of them?
Attachment control is supported in a Form rather than a Gallery, you could use the Form1.Updates to patch the attachment in a record. In a word, patch the attachment from the Gallery could not be achieved.
Have the dialog box closed after it is submitted, this is a new issue, please open a new case to post it.
Regards,
Qi
1) the pop up is
when user click the copy icon it will pop and show.. Onselect - Set(varSaveDiagBox,true)
and the ok will patch it after it patch, the popup did not go away.. how to make it go away and have a text successfully duplicate?
set - SortByColumns(
as I need to sort by category
Also is there any way to patch the attachment inside the record too??
I have question, when I delete or patch.. the data running back end is slow.. is it back it's lots of data and it's not on collection?? anyway to make it faster?? Thanks
Hi v-qiaqi-msft,
Is it like that?
ForAll(
GalleryAll.AllItems,
Patch(
'list',
Defaults('list),FormEditQ.Updates,
{
Description: TextInputDes.Text,
Category: {Value: CategoryText.Text}
}
)
)
hi v-qiaqi-msft,
I just the for all.. it copy a few .. i just want to duplicate the selected record and it attachment in it.. one row at a time
Thx
Hi @bbsin,
Sorry for the late reply, have you solved your problem?
If you just want to copy one record once you click the copy button in order to patch the selected record including the attachment, please try as below.
I'll consolidate all the information you gave me before and reproduce your process in full.
1).Make a Group by taking all the input controls within your pop-up window.
Select (Ctrl + Click) all the input controls those you want to make a Group. Click on 3 dot ellipses (…) and then Group as shown below.
2). Select the group and set its Visible property as
DisplayPopup // This is a variable
3). Set your copy icon OnSelect property as
Set(DisplayPopup, true )
4). Set the Cancel button OnSelect property as
Set(DisplayPopup, false )
5). Set the OK button OnSelect property as
Patch(
DefaultSelectedItem,
Gallery8.Selected,
{
Title: TextInput7.Text,
CH: {Value: TextInput8.Text}
},
EditForm2.Updates
);
Set(
DisplayPopup,
false
)
6). Set the Item property of the EditForm2 as
Gallery8.Selected
Note that EditForm2 is the FormEditQ in your scenario, CH is a Choice column in my SP list. Every time you select a record in the gallery, the FormEditQ will be populated with this selected record, and to meet your need that patch a attachment within the record, you could refer to the FormEditQ.Updates to catch the attachment.
Please check the attach Gif for details.
Regards,
Qi
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
180 | |
139 | |
96 | |
83 |