
I created a gallery to be able to submit multiple lines to Sharepoint with the same ID, so these can be grouped in another screen under one "request" (I did it based on this Shane video).
Although, when I save the first line of the gallery to my collection, the data from the comboboxes disappear.
I'll copy here the details of one of the comboboxes I have:
DefaultSelectedITems property:
{Result: ThisItem.CommercialID} // I also tried {CommercialID: ThisItem.CommercialID}, but it didn't work either
Items property:
Distinct(
Sort(
Filter(
coll_getPOData,
DateValue(ValidFrom) <= DataCardValue2_3.SelectedDate &&
DateValue(ValidTo) >= DataCardValue2_3.SelectedDate &&
Supplier = ComboBox1_1.Selected.Value
),
CommercialID,
SortOrder.Ascending
), CommercialID
)
Save button's OnSelect property:
Coalesce(
If(
drop_Opcos_1.SelectedText.Value = "Select Market" ||
!IsBlank(PriceError_Label.Text),
DisplayMode.Disabled
)
);
Patch(
colPOitems, ThisItem,
{CommercialID: CID_ComboBox.Selected.Value,
SAPID: SAPID_ComboBox.Selected.Value,
Description: Description_TextInput.Text,
TranType: TranType_ComboBox.Selected.Value,
ItemPrice:ItemPrice_TextInput.Text,
CCY: CCY_TextInput.Text,
QTY: QTY_TextInput.Text,
LineTotal: LineTotal_TextInput.Text,
ShowSaveButton: false}
);
Collect(
colPOitems,
{CommercialID: "",
SAPID: "",
Description: "",
TranType: "",
ItemPrice:"",
CCY: "",
QTY: "",
LineTotal: "",
ShowSaveButton: true}
)
Could someone please advise what I'm missing? Thanks!