Use multiple data connections to submit a form to different locations depending on a multiple choice list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Use multiple data connections to submit a form to different locations depending on a multiple choice list

Last post 04-10-2018 11:21 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-09-2018 11:46 PM

    • rudyy
    • Not Ranked
    • Joined on 04-06-2018
    • Posts 2

    Use multiple data connections to submit a form to different locations depending on a multiple choice list

     Hello,

     First of all thank you for adding me to this forum. It looks pretty interesting since I have to work a lot with InfoPath for my internship.

     

    My question is kinda the same as this post: http://www.infopathdev.com/forums/p/21359/74009.aspx

    This is my problem:

    I'm creating a form and I'm trying to figure out how to resolve my problem. When people submit the form I want the form to be saved in subfolders depending on a answer in the form. This way we can categorise the forms submitted.

    Let's say the form has 3 answers (it actually has around 60-70):

    1. Amsterdam

    2. Eindhoven

    3. Den Bosch

    The answer choosen is Amsterdam. When the form is submitted I want to have a rule that says the following:

    If field1 = Amsterdam then submit form to /sharepoint/list/city/a/amsterdam/

    If the answer is Eindhoven the rule has to be If field1 = Eindhoven then submit form to /sharepoint/list/city/e/Eindhoven/ etc. I think you get it. 

    I think I have figured out how to set up multiple data connections but I don't know how to add rules or lines of codes to make it work. If someone could explain it to me how to make this work in noob-friendly language I'll probably be able to fix any other problem I run into myself.

    Thanks for your time! 

  • 04-10-2018 07:54 AM In reply to

    Re: Use multiple data connections to submit a form to different locations depending on a multiple choice list

     Hi! You will end up having to create a LOT of data connections for this, and a LOT of rules. However, it can be done with data connections and rules (even if it may seem a little clunky). Under the Data tab in the ribbon, you'll find the Submit Options. Set the Submit options to use rules (see screenshot). In the Submit Rules (this button can also be found under the Data tab), you'll need to add rules for each submit. Each rule will have a condition that basically says "If the Answer is This Country, Submit using That Data Connection" - so if the Answer is Amsterdam, use the data connection that points to that folder.

    This is basically the same thing as you've outlined - so I'm guessing what you are having trouble with is just the setting for submitting via rules, but let me know if you have additional issues. 


    Hilary Stoupa

  • 04-10-2018 11:05 AM In reply to

    • rudyy
    • Not Ranked
    • Joined on 04-06-2018
    • Posts 2

    Re: Use multiple data connections to submit a form to different locations depending on a multiple choice list

    Hi Hilary, Thank you for your fast reply. My problem is writing the rule or translating the rule into code. I'm an IT student and my study is Server/Network related so I'm not known with writing code. Let's say this is the path where the form has to go when the answer is 'Amsterdam': https://mypage.sharepoint.com/_layouts/15/sharepoint.aspx/city/a/amsterdam/ And this is the part where I get stuck: https://ibb.co/cGstPx If there is 2 fields, the first field (field1) you enter the data (city) and the second field (field2) is the Submit button. I think I have to set the rule on field2 but from there I get stuck. Do I make a new 'Validation' or a new 'Action'? And after that I'm not sure if I have to write the rule down myself or use the boxes to choose from options like: lower then or higher then etc. I'm sorry if I'm a bit confusing in my writing but I hope you can understand me. Thank you for your help.
  • 04-10-2018 11:21 AM In reply to

    Re: Use multiple data connections to submit a form to different locations depending on a multiple choice list

    This is an action rule. So in the submit rules, add a new Action. Then you can add a condition. The first dropdown would be the field with your answer value. The second dropdown would be is equal to. The third dropdown, you'll type text - and enter the text for the condition (like Amsterdam) - you don't need to add quote marks, just type the text. Then add an action in your new rule - that action will be to Submit the form, and you can pick the data connection that submits to your Amsterdam folder. Does that make sense?
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.