Hi,
I want to submit a form once some conditions are met. The first condition is to check the status (DataCardValue105). If status is "In progress", the form is submitted. If status is "Completed", some other condition apply - all mandatory fields should be filled in. If the mandatory fields are blank, a warning message should show up.
I have tried this:
If(DataCardValue105.Selected.Value = "Completed" , If
(DataCardValue79.SelectedDate = Blank() && DataCardValue80.Selected.Value = Blank() &&
DataCardValue81.Selected.Value = Blank() &&
DataCardValue82.Text = Blank() &&
DataCardValue83.Text = Blank() &&
DataCardValue84.Selected.Value = Blank() &&
DataCardValue85.Selected.Value = Blank() &&
DataCardValue86.Selected.Value = Blank() &&
DateValue5.SelectedDate = Blank() &&
DateValue6.SelectedDate= Blank(),
UpdateContext({textboxvisible:true}), SubmitForm(Form2)), SubmitForm(Form2));
Using this code, the form is submitted even though status is completed and mandatory fields are blank.
Can anyone help me with this?
Thank you