Hello guys,
i am trying to create a collection based on some items in a gallery that i have to be displayed in another gallery in the next page in this way, and I am also creating the main collection here as well:
///////////selecting the selected IR items:
ClearCollect(
colSelectedItems,
Filter(
gallItems.AllItems,
'IR Request ID'.'IR Request Id' = galIR.Selected.'IR Request Id'
)
);
/////---------- creating the po supplies patch colllection:
ClearCollect(
POSuppliesItemsCol,
{
'Expenditure Type': "",
'Deliverables': "",
'PO Id': "",
'New Quantity': "",
'Date Promised':"",
Amount: "",
'Previous Quantity': "",
'New Unit Price': "",
'Previous Unit Price': "",
UOM: "",
WBS: ""
}
);
now in the next page i have the gallery called galPO, and there I have the item set to
Patch(
POSuppliesItemsCol,
{
'Expenditure Type': ExpenditureTypeInp.Text,
'Deliverables': DeliverablesInp.Text, // Removed extra space
'PO Id': NewPOID,
'New Quantity': Value(newQuantityInp.Text),
'Date Promised': DatePromisedInp.SelectedDate,
Amount: Value(AmountInp.Text),
'Previous Quantity': Value(prevQuantityInp.Text),
'New Unit Price': Value(newUnitPriceInp.Text),
'Previous Unit Price': Value(preUnitPriceInp.Text),
UOM: UOMInp.Selected.Value,
WBS: WBSInp.Text
}
);
Collect(
POSuppliesItemsCol, {
'Expenditure Type': "",
'Deliverables': "",
'PO Id': "",
'New Quantity': "",
'Date Promised': "",
Amount: "",
'Previous Quantity': "",
'New Unit Price': "",
'Previous Unit Price': "",
UOM: "",
WBS: ""
}
);
and the fields there have this on their onchange property Select(Button1) and i have a form where their on its onSuccess property i am trying to store the info in my table:
ForAll(
POSuppliesItemsCol,
Patch(
'PO Supplies Details',
Defaults('PO Supplies Details'),
{
'Expenditure Type': ExpenditureTypeInp.Text,
'Deliverables ': DeliverablesInp.Text,
'PO Id': NewPOID,
'IR Request ID': SelectedItem.'IR Request Id',
'New Quantity ': Value(newQuantityInp.Text),
'Date Promised ': DatePromisedInp.SelectedDate,
Amount: Value(AmountInp.Text),
'Previous Quantity ': Value(prevQuantityInp.Text),
'New Unit Price': Value(newUnitPriceInp.Text),
'Previous Unit Price': Value(preUnitPriceInp.Text),
UOM: UOMInp.Selected.Value,
WBS: WBSInp.Text
}
)
);
Clear(POSuppliesItemsCol);
i am still new to powerapps and i would really appreciate it if anyone can guide me with this, like why is it storing duplicates of the record and whenever i click on any of the fields in the gallery it shows me the data source error as well this is also how the page looks:
thank you in advance


Report
All responses (
Answers (