If/Then in submit to SP library - InfoPath Dev
in

InfoPath Dev

If/Then in submit to SP library

Last post 07-29-2013 07:21 AM by joe_detroit. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-25-2013 10:46 AM

    If/Then in submit to SP library

    Hi All...

     

    Is it possible to do if/then logic in a submit to library connection?  I want the word "UNAPPROVED" to be added to the filename if the restult of a dropdown is 'NO".

     

    I tried using some rules attached to the dropdown that would populate a hidden textbox, but the submit function used the formula in the textbox as the filename.  I didn't think that would work, but I figure it was worth a shot...

     

    Thanks,

    joe

  • 07-25-2013 09:40 PM In reply to

    Re: If/Then in submit to SP library

    Hi Joe,

    You can try adding a field in your data source called "FormName" and add a rule in your submit button that sets its value. So, for example, add a rule with condition if dropdown is = NO, set value of FormName = concat("SomeFormTitle - ", "UNAPPROVED). Then, add another rule with condition if dropdown = X, set the value to of FormName to Y.

    Hope that helps,

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 07-26-2013 03:39 AM In reply to

    Re: If/Then in submit to SP library

    Hi Jo-Anne--

     Thanks, I'll give that a shot.  I tried rules attached to the dropdown, but didn't think about the submit button.

  • 07-27-2013 09:24 PM In reply to

    Re: If/Then in submit to SP library

    Hi Joe_Detroit,

    The submit data connection doesn't support rules, but you can add an xpath with conditionality. Here's the trick:

    • concat(substring("UNAPPROVED", 1, 10 * (Field = 'NO')),' ', Field2)

    In other words, if Field is your dropdown and it is 'NO', then Field2 (your form name) will be prefixed with "UNAPPROVED ".

    Hope this helps.

    Best,

    P

    Patrick Halstead
    Project Manager at Qdabra
  • 07-29-2013 07:21 AM In reply to

    Re: If/Then in submit to SP library

    Ok...  haven't tried anything with xPaths so I'll have to read up on them.

     

    Thanks for the help!

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