I have an app that's connected to a SP list.
One of the columns in the list is a choice column for "Package type".
In the App there is a dropdown to choose the packages, and multi-select is On.
When patching the form, the multi-selected choices got patched together! for example, if the user selected pckg1 & pckg2, I'm getting 2 entries and in the value of the choices columns I'm getting both!
How to make them patch the 1st choice in the 1st entry and the 2nd choice in the 2nd entry?
P.S.:
- I tried to patch the DataCardValue & tried the comboBox both gave me the same results 😞
- Using DataCardValue.Selected.Value gave me errors
Code:-
With(
{
wDays: AddColumns(
ComboBox1_1.SelectedItems,
"AddDays",
Value(Span)
),
wDate: Now()
},
ForAll(
//DataCardValue25_1.SelectedItems,
ComboBox2.SelectedItems,
ForAll(
DataCardValue4_1.SelectedItems,
ForAll(
wDays,
Patch(
'Products List',
Defaults('Products List'),
{
'Product Code': Value(DataCardValue26_1.Text),
'Package type':ComboBox2.SelectedItems,
Title: DataCardValue11_1.Text,
'Batch No.': 'BNO DATACARD'.Text,
'Samples Description': DataCardValue14_1.Text,
'Stability Conditions': DataCardValue4_1.SelectedItems,
'No. of samples': Value(DataCardValue13_1.Text),
Location: DataCardValue33_1.Text,
'Incubation Date': wDate,
EditProp: true,
'Stability Interval': Period,
'Expected Withdrawal date': DateAdd(
wDate,
AddDays,
TimeUnit.Days
),
'Stability Period': DateAdd(
wDate,
AddDays,
TimeUnit.Days
)
}
)
)
)
)
);
Navigate(
SuccessScreen,
ScreenTransition.Fade
);
NewForm(Form1_1)