Double Eval, concat - InfoPath Dev
in

InfoPath Dev

Double Eval, concat

Last post 02-02-2015 09:13 AM by WiReLaD. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-26-2015 01:55 PM

    Double Eval, concat

    Hi, need some help please.

    I’m trying to use the eval(eval concat trick but without any joy. It’s almost working but has errors.

    I have a repeating table looks something like this:

    - gRCAActionsTrans

    +goup21

    ++group22 which is the repeating table

    Within this table I have 3 fields: field5 (Rich textbox), field 7 which is a date picker & field 8 which is a date picker.

    Then below all of this I have a rich textbox which I named [ActionsConCat] also BTW within the repeating table I have a group people picker.

    What I’m trying to do is take the data which is added into field5 (only) and concat it into the [ActionsConCat] so I can then submit this field to SP.

    So in the row of things looks like this:

    Comments      Action Owner               Assign Date     Completed Date

    [Field5]       [people picker group]          [Field 7]             [Field8]

    and below - [ActionsConCat]

    It was suggested to me, I add a rule behind feild5 that says (field5 not blank) do this: eval((eval(.., 'concat(., "; ")')), "..")

    And this seems to work although it doesn't put the " ; " between each description when field 5 is written into and also more worryingly, if I add people and dates to the pickers,

    this data also gets concatted into the same textbox [ActionsConCat]

    Please help,

    Mike

  • 01-28-2015 05:14 PM In reply to

    Instead of a rule on Field5, if ActionsConCat is outside of the repeating group, you can just use a default value for that field, and use the double eval formula there.

     eval(eval(PickTheRepeatingGroupWithTheFieldPickerHere, 'concat(my:field5, "; ")'), "..")

     

    Hilary Stoupa

  • 01-31-2015 04:30 AM In reply to

    Hello Hilary, I finally get to meet you (kinda!) perhaps without you knowing, you’re like a goddess to me throughout INFOPATHdev and my learning over the past 12 months, think I've perhaps read nearly all you posts hehe. Thank you.

    Ok this double eval trick thing! Well, I've sort of give up with it! I know it’s sad to give up but really, I'd spent over a week trying to get it to work and still got no joy.

    As you say above, placing the eval string within the ActionsConCat default field directly, this is how I had it in the first place. Somebody in the MS forums told me to move it to field5 and add this rule  "if not blank" then do eval, concat...trick. None of it worked.

    Here's the thing though! Nearly drove me off the edge, put me in the Priory. All this started with a repeating table, I only wanted to promote the first field, field5 to SharePoint. This field by the way was set as rich text box. When I went to promote field5 I expected to see the merge option but it’s not there, which lead me down the double eval trick. After losing sleep, waking up in the middle of the night with cold sweats with more ideas (you know what it’s like...its driving me mad) I'm then told in MS forum this doesn’t won't work with rich text box, inside a repeating table!!!!

    If this is true? I had to change field5 into a standard textbox, I even.. for a day or so, continued to try the double eval trick with this and then realised, if I’m using standard textbox then the merge option must be there....it was, so I’ve gone down that route and its all working fine.

    Don’t know if you want to add anything to this Hilary, can it work with rich text box? Im sure over time I’m going to need to eval(eval a rich text box but for now..its over. J

    Best regards,

    Mike



  • 02-02-2015 07:39 AM In reply to

    So - when I saw your post originally, the first thing I did was try to promote a repeating rich text field - and found just what you did - that we can't "merge" if RT.

    You are right - if plain text, you can merge.

    I'm attaching a template that uses double eval, so you have a sample. The concatenated text won't have the RT format, but it does give you all the text in a single field you can promote.

    Save the attached file locally. Right click and select Design to open in design mode - then you can preview and take a look.

    I'm glad to hear my other posts have been helpful!

    Hilary Stoupa

  • 02-02-2015 09:13 AM In reply to

     

    Hello Hilary,

    Again thank you for your reply and for the attachment - This now at least proves it can be done, I was beginning to wonder!!

    As I have now changed all the associated forms back to standard text boxes, I’ll park this for now. Hope you don’t mind, I know you’ve spent the time helping me and I really do appreciated it, really. The thing is, I’ve resubmitted about 50 forms back to SharePoint now, all with a merged textbox option.

    As for your string – I haven’t sat and looked at the difference yet (but I will) I’m sure I must have tried all your form suggests. But who knows.

    Hilary, its a massive thanks and keep up all the good work, Im sure our InfoPaths will cross again.

    Best regards,

    Mike

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