Skip to main content

Hi

 

Does anyone know how I can create nested if statements in my VIew? I have few dropdown list controls all of which are empty. The user has to select either 'Yes' or 'No' and based on the selection there will be some scoring calculation when the Next button is clicked. However before the calculation happens, I want to validate the view. The if statement needs to look something like this:

 

If the View passes validation

  if Dropdown1 contains Yes

     --do some calculations

  if Dropdown2 contains Yes

    --do more calculations

  etc

end if

 

Or it can also be something along this line:

 

If the View does not pass the validation

 ---message

else

{

 do some calculations

}

 

Is it possible??

 

Thanks

Lena

Good day Thompsle


 


Have you tired the following:


In your rules


When the View executed Save


if the View passes validation (configure)


then show  message to the user (configure)


else


then show a message to the user (configure)


 


You are able to specify what/which fields within your view should be validated and what action should take place should the rule validate successfully.  Here are some linkes to help you understand more about validation rules in K2:


http://help.k2.com/helppages/K2smartforms1.0.4/webframe.html#Creating_a_Custom_Pattern.html


http://help.k2.com/kb001346


 


I hope this will help!


 


Kind regards


Nelly


Is this what you want?
http://i.imgur.com/8sjY7VL.png


Good Morning Lena,


 


Are your calcuations happening on the form?  Post a screenshot of your current layout so we can get a look at what you've built already.  


 


You can use Austin's rules to fire events on your form/or view if you have already got them setup.


 


You can setup multiple conditions on a control depending on various situations.


 


David


Reply