I have a requirement out 10 questions user has to answer at least any 6 questions and also there is another tabbed section where out of 12 Questions user has to answer at least 3 Questions otherwise the form should not get submitted or an error message should Popup.
I have tried below functions.
If(
CountIf(
[
DataCardValue13,
DataCardValue14,
DataCardValue15,
DataCardValue16,
DataCardValue17,
DataCardValue18,
DataCardValue19,
DataCardValue20,
DataCardValue21,
DataCardValue22
],
!IsBlank(Value)
) >= 6,
Notify(
"Please Answer atleast 6 rapid Fire Questions",
NotificationType.Error
),
If(
CountIf(
[
DataCardValue23,
DataCardValue24,
DataCardValue25,
DataCardValue26,
DataCardValue30,
DataCardValue31,
DataCardValue32,
DataCardValue34,
DataCardValue35,
DataCardValue36,
DataCardValue37,
DataCardValue38
],
!IsBlank(Value)
) >= 3,
Notify("Please Answer atleast 3 Questions"),
SubmitForm(Form1)
)m
)
Seems like it is not working and form is getting submitted even after the columns are blank. But if I am trying single if condition it is working. Kindly help me on this scenario.
You have to pass the exact input value in the formula.
For example:
If you are using all text inputs, you have to use:
Instead of just
DataCardValue32.If you are using drop down controls, use:
You have to pass the correct values to the formula.
Also, you may want to use [Table function in Power Apps](Table function in Power Apps) to create a proper table of value instead of wrapping them withing
[].