complex logic/routing - InfoPath Dev
in

InfoPath Dev

complex logic/routing

Last post 09-25-2009 07:54 PM by Qazi Anis. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-24-2009 09:05 AM

    complex logic/routing

    Hi everyone, i'm new here - and to infopath. I have a question that I think I know the answer to (can't be done without VSTO).

    I have an Infopath form that will be deployed in a browser, and on it - there are a bunch of check boxes and radio/option buttons.

    I have a text box that I want to list all of the email addresses of people who will receive the email from the form, this list of email addresses is determined by which check boxes/option buttons are selected on the form.

    So I have a form:

    []blue []red []green []white

    O yes O no

    []one []three []five

    TextBox: [                                            ]

    and as they tick these options, I need to update the text field with email addresses - but also remove them as those options change. so I need some kind of list of routing logic that gets executed whenever an option is changed, is that possible without VSTO?

    From what I understand, VSTO/code behind can't be done if the infopath form is published to a browser. I would really appreciate anyone's thoughts...

     Thanks everyone!

  • 09-25-2009 12:15 AM In reply to

    you can put rules on all the check/option buttons. Actually there will be two rules one to add email address when selected and another to remove email address when deselected.

    1) if check/option is selected && textbox1 doesnot contain new_email_id

    textbox1 = textbox1 + email id

    2)if check/option isnot selected && textbox1 contain new_email_id

    textbox1 = stringbefore(new_email_id,textbox1) + stringafter(new_email_id,textbox1)

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 09-25-2009 07:28 AM In reply to

     Thanks Qazi, this makes good sense - and I tried it... but when it fills the textbox1 with the email, it instead puts in "NaN". (without the quotation marks). I have it as your formula: substring-before("[email protected]", textbox1) + substring-after("[email protected]", textbox1)

     any thoughts?

    thanks for taking the time, this is frustrating...

  • 09-25-2009 08:18 AM In reply to

    sorry,

    iii have put it wrong way, it should be

    textbox1 = string-before(textbox1, new_email_id) + string-after(textbox1, new_email_id)

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 09-25-2009 08:37 AM In reply to

    I tried that, it still reads "NaN" in the text box. Normally, that error means you're trying to do math with a string, instead of a number. It means "Not a number". I have no idea what the issue is...

     I'll keep playing with it, but if you have any other suggestions - i'll try them. Let me know!

     

  • 09-25-2009 09:10 AM In reply to

    Plus doesnt work that way.

     You should use concat function instead : textbox1 = concat(string-before(textbox1, new_email_id), string-after(textbox1, new_email_id))

  • 09-25-2009 10:37 AM In reply to

     of course! it thought I was trying to obtain the sum of the 2 strings. Thanks to both of you for your help - I really appreciate it!!

  • 09-25-2009 07:54 PM In reply to

    sorry ducati i forgot the concat function

    thanks Alec for the help.

    Actually i am on vacations these days, so a bit of cut off from InfoPath + i dont have InfoPath installed on this box to cross check.

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.