In our active directory the City is represented with a numerical character. On the form we want to spell out the City. I created a Smart object called City that has properties CityNumeric and CityAlphabetic in a test environment and created a list view from it and populated the list with the numeric values and the alphabetic values.
I call an unbound rule in the initialize section. On the form I populate the AD Values from AD User smart Object including City. To change the city to alphabetic I execute a smart object method and for the input I select the City Text box to receive the CityNumeric value and for the output I populate the City Text box with the value CityAlphabetic. It works like a charm and the city is spelled out-In this small test environment.
For the real Form, which retrieves many more AD properties, I duplicate the above method exactly and it does not work. When I run the form, the spelled out city appears for a split second and then the numeric value replaces it. I’ve check and rechecked the smart object properties, the view properties, the form properties and all the rules and everything is identical to the test system.
Is it possible that because I am pulling more AD data in the real form, that AD User smart object method is not done when I execute the city conversion and it just gets overridden? Been scratching my head on this one all day. Attached you will find a picture of the test form and the real form.
Hi @jaswerl ,
Could your rule to spell out the city names be executing before the Forms/Views/Controls have finished executing?
Since you are pulling a lot more information it could be that your rule is executing correctly but then get’s overwritten by other rules either in the Form, the Views or on the controls specifically with SmartObject associations etc.
Additionally if you can’t come right with your current methods you could you edit the SmartObject data source options and add association’s on the actual control that will execute by itself - similar to this.
Thanks for the Reply. DUH, I forgot to mention that we also pull in all the information if we CHANGE the User with a picker. So the Rule also hade to be placed in the On Picker Change rule. So now it works fine. Apparently K2 recognizes any call as a change.