Popup Box - InfoPath Dev
in

InfoPath Dev

Popup Box

Last post 06-28-2012 12:20 PM by shep123. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-28-2012 08:47 AM

    Popup Box

    For the sake of simplifying my form I have a form that culminates in the user clicking a button that dispalys a informational popup. The popup displays field A, field B, field C, field D, field E from the formula concat(fieldA, linebreak, fieldB, linebreak, fieldC, linebreak, fieldD, linebreak, fieldE). This works perfectly when all of the field's are populated with a notification. However if only fieldA and field E are we get those two fields with 4 linebreaks in between (obviously not ideal). I want to know if there is a way I can write an expression that will read which fields are populated and display only those with the singular line break in between. An expression with a bunch of nested if' then statements is what I was looking for but I don't know how possible that is.

    I know I can make 30 rules for each condition and that may be what I have to do. However, before I took the time to do that, I wanted to ensure that it was my only option. I know that I could create an individual popup for each box. The issue with that is the user often just clicks ok a bunch of times (if multiple ones are applicable) to get through them rather than actually reading them. My hope is that with one popup they will actually read it. Is this possible or will I just have to make 30 rules on each condition? Any help is appreciated even if it just says I'm stuck making a bunch of rules. Thanks!

    Filed under: ,
  • 06-28-2012 11:33 AM In reply to

    How about something like this:

    translate(eval(eval((fieldA | fieldB | fieldC | fieldD | fieldE)[. != ''], 'concat(., "#")'), '..'), '#', linebreak) 

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-28-2012 11:46 AM In reply to

    I get an expected value type: end-of-string error at this point --> , '..'), '#', linebreak):

                                                                                                   
    I'd try and work through it myselve but I liternally have no idea how this expression works

     

  • 06-28-2012 12:05 PM In reply to

    Could you paste the exact formula you're using?
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-28-2012 12:06 PM In reply to

    When I do this:

    translate(eval(eval(fieldA, fieldB, fieldC, fieldD, fieldE, (. != ''), "concat(. , '#')"), ".."), "#", linebreak)

    I get this error: Invalid number of parameters. Error occurred during a call to property or method 'Eval'.

  • 06-28-2012 12:12 PM In reply to

    What you have there is considerably different from what I posted. Where I had this:

    (fieldA | fieldB | fieldC | fieldD | fieldE)[. != '']

    you have this:

    fieldA, fieldB, fieldC, fieldD, fieldE, (. != '')

    notice the difference?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-28-2012 12:20 PM In reply to

    Yeah tha't my bad. I think when I started to bring the formul over I messed up ( vs. [ and just assumed you meant , for the vertical line thing. It works though thanks for your patience!

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