Populate text box with premade text based on what is selected - InfoPath Dev
in

InfoPath Dev

Populate text box with premade text based on what is selected

Last post 07-05-2016 09:43 AM by iLoveData. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-01-2016 03:44 PM

    Populate text box with premade text based on what is selected

    I have a dropdown box that is filled from a sharepoint list, The list includes roles of directors, now we want directors to be able to be selected but a warning to flash if and only when some title that includes directors is selected, all options would not have the warning spring up. Right now the idea was to use a section control that is hidden umtil a role is selected that includes directors. so far either nothing pops up after being hidden or the section control is engaged when anything is picked even roles that do not include thte directors in the name. Rule type: Formatting current conditions: Security Role is Blank and security roles contains "Directors" Trying to show section control box only when a role containing directors is picked -Thanks Dismal
  • 07-01-2016 04:26 PM In reply to

    Re: Populate text box with premade text based on what is selected

     In general, when a condition is not applied when I expect it to be, I either have the condition wrong, or I am incorrect in what the current value is. I'm guessing you are currently hiding if the security role is blank or if the security role contains directors? Is that the case? Try putting the security role field on your form as a text box so you can experiment a bit, and only add one condition at a time to hide the warning.

    Hilary Stoupa

  • 07-01-2016 04:41 PM In reply to

    Re: Populate text box with premade text based on what is selected

    Hilary so the current value of the drop down list is the ID, 1. I don't know how to find what the ID of the sharepoint item 2. If i do find that ID how to I use that to filter in conditions, do I input a number or is there another way to use sharepoint list ID to filter within conditions. thank you again -Dismal
  • 07-05-2016 09:43 AM In reply to

    • iLoveData
    • Not Ranked
      Female
    • Joined on 06-06-2016
    • Richmond, VA
    • Posts 6

    Re: Populate text box with premade text based on what is selected

    Hello there,

    Your condition statement in your rule does not work because a field can't be Blank AND contain the word Directors, the AND should be an OR statement. Then you also have it backwards. You will want to create the rule on a separate Alert_Field which you can format with a validation message or set up rules to determine which message to display. The Alert_Field will be hidden if the Role field is NOT blank AND the word Director IS NOT present (which is what you want). The alert field will only be displayed if the the Role_Field is Blank OR contains the word Director. So, change the AND to an OR and change the contain to a "does not contain":


    Rule type: Formatting
    Condition: Role is not blank OR Role does not contain "Director"
    Formatting: Check, hide this control.

    Let me know how things go :-)

    Data, data and more data. Oh, and did I mention data?
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.