Skip to main content

When using the Choice control in a smartform, is there any way in the rules engine to know if the users has specified their own value instead of selecing one of the options from the datasource.  I need to make updates based on the "on change" event but i don't want that event to fire if the user has entered their own value. 

Is choice control part of the newer SmartForms?  I haven't gotten a chance to play with those yet.

 

You'll have to create something that you can bounce some rules off of in the form of a condition.

 

If there are smaller data parts, I will usually put in a ghost control that I can run a conditional statement against.  If you are working with SQL or SharePoint, I would guess that you would have to have a table to look on where the data exists.  If it doesn't exist then don't fire the event.

 

In your case to check if they specified their own value, I would probably go with a Form Parameter (or ghost control) that is true or false and have a rule that checkes to see if the data in the choice control exists.  Depending on that check, I would modify the form parameter and have a conditional statement only fire the event if it was in a particular state.


Hi AtrionMRaucci


 


I agree with Daerne that you should have a look at Conditions.


Please have a look at these documentations which will help you to achieve you required solution.


K2 Rule Designer Conditions


K2 Rule Designer Conditions 2


K2 SmartForm Fundamentals - Look at the PDF from page 69


Thats great, but if there is data in the choice control i have no way of knowing if that data was entered by the user selecting an existing value or if it was entered by the user entering their own value as the value of the choice control will just contain whatever was selected/entered.  Hence, why i need a way to know if the users selected, "specify your own value"

 

I was able to accomplish what i needed using error handling based on the fact that my chocie control loads an int for the value and text to display, so if they enter their own value there will be no integer value it will be text, so i use an advanced condition to trap on the error of converting string to int and then do what i need to from there.

 

 

 

 


Reply