locked
Create a Table based on Option Boxes selected and send email RRS feed

  • Question

  • I know how to create a Workflow to send emails.

    The purpose of the form is a user can select multiple option boxes and depending on the option box selected a text box should appear for input location. One text box per Option Box.

    For example,  I have multiple option boxes, like Microsoft Word, Adobe, Windows, etc. If the user checks Microsoft word & Adobe, there should be two new text boxes created for application location.

    So in the email it would appear as follows in a Table.

    Build Details        | Location

    --------------------|

    Microsoft Word    | C:\Office\

    Adobe                 |C:\Adobe

    Thursday, July 11, 2013 2:37 AM

Answers

  • >If a user click on Option 1 & 6, I need two rows, each row contains two check boxes for label and input

    You need to set rule on repeating table checkbox and use preceding sibling to know which checkbox is selected. I have done similar thing earlier and here is the expression:

    Steps:

    1. Create a rule on checkbox and use below expressions and add a hidden text field (make o as default value) to show/hide textbox.

    2. Now if this condition is true then set value of hidden textbox is 1

    /my:myFields/my:ProfileAccess_section/my:AccessProfileA/my:AccessProfileAA/my:rdb_AccessProfileA[count(current()/preceding-sibling::my:AccessProfileAA/my:rdb_AccessProfileA[. = "true"]) > 0]

    /my:myFields/my:ProfileAccess_section/my:AccessProfileA/my:AccessProfileAA/my:rdb_AccessProfileA[count(current()/following-sibling::my:AccessProfileAA/my:rdb_AccessProfileA[. = "true"]) > 0]
    3. Later create a formatting rule in repeating table textbox and say:

    if hidden text value is equal to 0 then hide it.

    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Friday, July 12, 2013 6:01 AM
    Moderator

All replies

  • Hello,

    Which version of SP you are using 2007/2010/2013?

    As i understand, you want to show text box based on selection. You ca create a infopath form and add one repeating table with checkbox and two textbox controls (one for label and second for location). Now hide location textbox on form load like:

    add formatting rule on location textbox:

    If checkbox is false then hide location textbox.

    See below link for you ref:

    http://www.inclusivedesignsolutions.com/infopath/infopath-conditional-formatting-showhide-optional-section-via-checkbox-or-radio-buttons/

    Let us know in case any doubt


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Thursday, July 11, 2013 6:19 AM
    Moderator
  • THe problem is see with repeating table is I have SIX option boxes. If a user click on Option 1 & 6, I need two rows, each row contains two check boxes for label and input, how would a repeating table help?

    When I created 6 rows of text boxes, two text boxes on each row. However, when I select options 1 & 6, the text boxes appear, but it shows  text box 1 & 6. This means there is an empty row in between(2-5). I want the text boxes to appear after one another.


    Also, I am using SP2007
    • Edited by anon1m0us Thursday, July 11, 2013 12:19 PM added sp version
    Thursday, July 11, 2013 12:16 PM
  • >If a user click on Option 1 & 6, I need two rows, each row contains two check boxes for label and input

    You need to set rule on repeating table checkbox and use preceding sibling to know which checkbox is selected. I have done similar thing earlier and here is the expression:

    Steps:

    1. Create a rule on checkbox and use below expressions and add a hidden text field (make o as default value) to show/hide textbox.

    2. Now if this condition is true then set value of hidden textbox is 1

    /my:myFields/my:ProfileAccess_section/my:AccessProfileA/my:AccessProfileAA/my:rdb_AccessProfileA[count(current()/preceding-sibling::my:AccessProfileAA/my:rdb_AccessProfileA[. = "true"]) > 0]

    /my:myFields/my:ProfileAccess_section/my:AccessProfileA/my:AccessProfileAA/my:rdb_AccessProfileA[count(current()/following-sibling::my:AccessProfileAA/my:rdb_AccessProfileA[. = "true"]) > 0]
    3. Later create a formatting rule in repeating table textbox and say:

    if hidden text value is equal to 0 then hide it.

    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Friday, July 12, 2013 6:01 AM
    Moderator