If , else or conditional field - InfoPath Dev
in

InfoPath Dev

If , else or conditional field

Last post 01-03-2007 10:56 PM by madhuri. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-03-2007 04:38 AM

    • soferfam
    • Not Ranked
    • Joined on 01-03-2007
    • Australia
    • Posts 2

    If , else or conditional field

    Hi all
    Hope someone can assist with a problem
    I'm doing an infopath form where the user inserts a document number.

    The number is semi-intelligent so if I use the substring function using XPath in a text box called "docSubType" I can extract the 8th digit of the doc number to equal a document type (eg A).

    I would now like to add to either that field or an additional one that if the doc type in the field mentioned above = "A" insert the text "Report", if the doc type = C insert the word "Calculation" etc etc. If Access eg we would use if([docsubtype]="A","Report",if([docsubtype]="C","Calculation","")) etc

    Any ideas on how to do that in InfoPath? I am not into writing code so any assistance would be appreciated

    Thanks..... Rob
  • 01-03-2007 10:56 PM In reply to

    Re: If , else or conditional field

    Hi

    You need to set rule on Doc Type field. To set rule on the doc Type field you need to do in the following way given below:

    1. Open form in design mode (Doc Type and Doc Sub Type fields present in the form)
    2. Go to Properties window of 'Doc Type' field by right clicking on the control and select 'Text Box Properties'
    3. Click on 'Rules' button at bottom of the properties window
    4. Click on 'Add' button
    5. Click on 'Set Condition' button
    6. From first dropdown Select 'Doc Type' Value , select 'is equal to' from second drop down and select 'Type Text' from the third dropdown box and then Type 'A' in that text box
    7. Click 'Ok'
    8. Click on 'Add Action' button
    9. From Action dropdown select 'Set a Field's value'
    10. In Field text box add Doc Sub Type field by using button beside it
    11. Now in Value text box, type the 'Report'
    12. Click 'Ok'
    13. Again Click 'Ok' for three times
    14. Save the form

    To add another value you need to set another rule.

    Hope this will help you.
    Madhuri
    http://www.ggktech.com
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.