Friday, 12 October 2012

How to Custom Validate in InfoPath MultiSelect List Box

1. You want to Add MultiSelection List Box(MSLB) & Text Box(TB) with Text Data Type.

2. Bind data Source(value & dispaly both  value name) with MSLB
   You getting like this in preview, After binding data in MSLB




3. You want to create Action rule in MSLB







4. Click Add with set field (field=TB & Value=true()).


5. Right Click on TB and Selct Text box properties


6. Click Fx Button


7. Click Insert Function & Select Count Function

8.Double Click on the "Double click to insert field" 

9. Select MSLB field from Main & Click Filter Data


10. Click Add Button

11. Don't Change 1st Dropdown as well as check, it is selected value will be MSLB from main
     2nd Dropdown will be "is equal to" & 3rd Dropdown want to select "select a field or group"


12. Select MSLB field from Secondary data source


12. Click Ok button for all window and Save it,

13. Once again click fx in TB (follow steps 5 & 6).

14. Add > 0 the like following window and click verify formula,

15.If it is showing the following message, you have done everything correctly, otherwise you want to check above steps

16. You want Create Validation & Hidden rule for TB, Before you want check TB text value will be true or false depends on the MSLB selection.

17. Validation rule condition "TB is equal to false" and type false in screen tip.
18. Hidden rule condition "TB is blank or TB is not blank" and select Hide.





  



1 comment:

  1. it is very useful, when you are using hidden section with multiselction as a required field.

    ReplyDelete