Keith777a
Novice

Picker Field: Testing for Resolved or Not Resolved.

Jump to solution

Hi All,

 

Does anybody know how to test if a Picker field is returning a Resolved or an UnResolved Element in the Picker field?

The field itself turns green if it resolves and then red when it doesn't natively. I'd like to use that functionality in my forms.

 

I have a Picker Field connectected to a SmartOjbect that is getting my AD accounts

When the form user types in a persons name I want to test that an acocunt doesn't already exist before I let them continue.

 

I though maybe the When Control is Set method but I couldn't seem to get that working.

 

Any help would be greatly appreciated.

0 Kudos
Reply
3 Replies
Keith777a
Novice

Re: Picker Field: Testing for Resolved or Not Resolved.

Jump to solution

I have found the solution myself, thanks anyway it was simple in the end.

 

On the Picker Rule 'When AccountCheckPicker is Resolving' I added the following.

 

Conditions 'a control contians a value' and 'a control does not contain a value'

 

If 'AccountCheckPicker' does contain a value

   Then complete the following one after another

           then 'Enable a control'

 

if 'AccountCheckPicker' does not contain a value

   Then complete the follwing one after another

           then 'Disable a control'

           

 

0 Kudos
Reply
RaymondJVR
Nintex Employee
Nintex Employee

Re: Picker Field: Testing for Resolved or Not Resolved.

Jump to solution

Hi Keith777a


 


To do this you will have to use your picker control as an invisible control that would do the job in the background.


For example i have a text box with a picker control, the picker control is set to my AD smartobject and i then have a rule that


1. Create a new view and drag in a text box, Picture control and a picker control.


2. Configure the picker control to the Ad Smartobject .


1068i70AC5D053105E866.png


 


3. Now you select the rules breadcrumb tab.


4. Add the following  new rule:


 


When Text Box is Changed


   then populate Picker list control with data (configure)            - no need to configure this rule


 


   if advanced condition is true                                                        - advanced condition is "Picker contains Text Box"


       then complete the following one after another


            then set the properties of Picture control (configure)    - set source to No picture


            then show a message to the user (configure)                  - set message to "Invalid Username User exists"


       then complete the following one after another


            then set the properties of Picture control (configure)    - set source to Yes picture


            then show a message to the user (configure)                  - set message to "Valid Username"


 


You can get the Yes and No images for the picture control from this location - C:Program Files (x86)K2 blackpearlK2 smartforms DesignerStylesPlatinumImagesIconsYes16.png


5. Now you can just set the Picker control to be invisible and the view is done, your user can enter their desired username, this name will be checked agains the AD users smartobject and a message and the picture control will let you know if the username is valid or not.


 


I did not include a button, When testing the view type the name and click anywhere in the view's blank area for the result to generate.


 


Kind Regards


Raymond

Reply
MatWiggins
Novice

Re: Picker Field: Testing for Resolved or Not Resolved.

Jump to solution

I foudn a solution for this. I was able to create a rule when the Picker is resolving, disable my Submit button. When the Picker is populated, enable the Picker control. To make this full proof, I put a validation condition on the Submit rule that basically evaluates the Picker for validation errors and if none, submits as usual. If errors occurr then it shows a validation error message and stops all rule processing.

0 Kudos
Reply