I am a new developer in power apps.
I have 2 lists; 'Product List' & 'Sub FJO'. I have 1 column in sharepoint called "product name" in the Sub FJO list (it is a lookup column which gets the data from the master list 'Product List'.
I have tried a similar approach to this article here for reference: Repeating Tables in Power Apps using SharePoint List Form 2.0 (anjcerbolles.com)
I have been trying to get the combo box to work with the collect and clear collect.
The issue is that when i add a new row in the gallery, the combo box data for row 1 disappears. I then later have to add the values again to the combo box after adding several columns. The patch does work correctly.
Clear Collect Function:
NewForm(CreateItemForm);
ClearCollect(
colInvoice,
{
LineItem: "",
LinePrice: "",
LineQty: "",
LinePayment: false,
LineProduct: ""
}
);
Set(
SharePointFormMode,
"CreateForm"
);
Navigate(
CreateScreen,
Transition.None
)
Combo Box Items Function:
Choices([@'FJO - Sub FJO'].ProductName)
Patch Function:
Patch(
colInvoice,
ThisItem,
{
LineItem: txtItemNameCreate.Text,
LinePrice: Value(txtPriceCreate.Text),
LineQty: Value(txtQtyCreate.Text),
LineProduct: ComboBox4.Selected.Value
}
);
Collect(
colInvoice,
{
LineItem: "",
LinePrice: "",
LineQty: "",
LinePayment: false,
LineProduct: ""
}
)
Form Submission on Success Function:
ForAll(
CreateGalleryItems.AllItems,
If(
!IsBlank(txtItemNameCreate.Text),
Patch(
'FJO - Sub FJO',
Defaults('FJO - Sub FJO'),
{
Title: CreateItemForm.LastSubmit.Title,
'Sub FJO Number': txtItemNameCreate.Text,
'TEST COLUMN': Value(txtPriceCreate.Text),
Quantity: Value(txtQtyCreate.Text),
'Product Name': ComboBox4.Selected
}
)
)
);
ResetForm(Self);
RequestHide();
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1