Add a record in another form based on result of conditional If in a subform
I'm trying to add a record to another form based on what the user chooses from a multi-select in a subform.
I am using on Success.
Before I created without a variable (var1) and it inserted a record, but every time. Completely ignoring the conditional If. Now it's doing nothing at all. I've tried adding a Success message by adding an 'else' parameter, but nothing happens.
Any pointers, help appreciated. I've been battling with this 2 days now.
CHILD_Steg5 is the subform
MLT_kansliga_data is the multiselect field.
Riskregister is another Form
var1 = input.CHILD_Steg5.MLT_kansliga_data;
if(var1.contains("Barn"))
{
insert into Riskregister
[
TXT_Titel=input.Titel
Datum=zoho.currentdate
DROP_Riskkategori="Behandling innehåller känsliga eller högrisk personuppgifter"
dropdown_Risk_niv="Hög"
DROP_Status="Avslutad"
Added_User=zoho.loginuser
TXT_Beskriv_omrisken="Lägg till barn - läggs till automatiskt som risk av en konsekvensbedömning av dataskydd"
]
}