Having trouble formatting repeating table info in an email - InfoPath Dev
in

InfoPath Dev

Having trouble formatting repeating table info in an email

Last post 09-17-2019 10:49 AM by quickshot23. 21 replies.
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts: Previous Next
  • 09-12-2019 11:34 AM

    Having trouble formatting repeating table info in an email

    Hello, I am working with InfoPath/SharePoint Designer and here is what I have so far: I created a form that among other things, requests 4 fields of data in a Repeating Table I have a rule on the submit button that takes all the entered data in the repeating table and concatenates it to another field that is used to pull to the email. Here is the formula: eval(eval(group6, 'concat(., xdXDocument:GetDOM("Characters")/characters/@crlf)'), "..") Group 6 is the repeating table. I want each line in the table to be its own line in the email which is what the crlf bit is about. In SP designer, I just have it pull that field: [%Current Item:Field 31%] What I am getting in my email is weird. The 1st entry (before the user clicks "Insert item" shows: Yes 20000 - FP Halves for BBQ 2 Bags The 2nd and 3rd show: Yes 20003 - FP Legs #2 4Boxes Yes 20004 - FP Drumsticks First issue is, the first record has line breaks throughout but the last record seems to be cut off randomly... Sometimes it will show the boxes and sometimes it will look like this above where it just shows the items. Any ideas? Thank you Stephen Ebling
    IT Project Manager/SharePoint Administrator
  • 09-13-2019 07:06 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    The above post is painful to look at so I want to simplify it: Repeating table on InfoPath form ---> Rule on Submit button: eval(eval(group6, 'concat(., xdXDocument:GetDOM("Characters")/characters/@crlf)'), "..") Email comes through showing first entry with line breaks after each field, the following entries come through as expected.
    IT Project Manager/SharePoint Administrator
  • 09-13-2019 08:13 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    Sorry about the formatting - our old forum software struggles with anything other than IE. So - if you put the field with the result of your eval formula on the form, I'm guessing it has the line breaks. I'm wondering if you could replace that line break character with something else, that you know won't be in the value, a special char like "~" or "|" or something - and maybe there is something in SharePoint Designer workflow that would allow you replace that special char w/ a line break? Just making wild guesses here - I'm assuming you've put the field that holds the result of the formula on your form and the line breaks are all there.
    Hilary Stoupa

  • 09-13-2019 10:08 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    In SP designer, I only have the field there I do not have any additional line breaks or anything I have all the formatting done in InfoPath I have 4 separate fields as a part of a group. Then the submit button uses this rule: eval(eval(group6, 'concat(., xdXDocument:GetDOM("Characters")/characters/@crlf)'), "..") to merge them together in a field. (field31) Then on SP designer, the entry just inserts that field: [%Current Item:Field 31%] Let me know if you have any ideas Thank you Stephen Ebling
    IT Project Manager/SharePoint Administrator
  • 09-13-2019 12:22 PM In reply to

    Re: Having trouble formatting repeating table info in an email

    I want to add: I do actually want line breaks....just after each group not after each field - The four fields the user enters are grouped into one group - I would like that 1 group on line 1 - any additionally added groups to be on subsequent lines - what it is doing currently is, it is adding a line break after every field for the first group, and then each additional group is done correctly - I wish I could send a picture on here - I can upload one to google drive or something if that works
    IT Project Manager/SharePoint Administrator
  • 09-13-2019 12:27 PM In reply to

    Re: Having trouble formatting repeating table info in an email

    Here are links to 2 screenshots showing the form and the relevant part of the email - look at the email and see the 2nd and 3rd entry as compared to the first ----Form Screenshot: https://drive.google.com/open?id=1_vf51ROIkDycilp65i9GY4Uy1MLszhz8 ---- Email Screenshot: https://drive.google.com/open?id=14DbRoX0FRjJfahl1YGG9BnVbRXjPMpPX
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 09:21 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    Can I see a copy of your form? You can attach it to a reply under the options tab.
    Hilary Stoupa

  • 09-16-2019 10:02 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    Form attached
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 10:05 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    I obviously made changes Here is a screenshot of the output currently (See attached) Ideally, I would want each line (group) from the form to have its own line
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 10:56 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    So - I'd probably put field 31 on the form, add a test button, and set field 31 the way you want (i.e., using the character return) and make sure the data looks the way you want. Then you could check if SharePoint Designer is the culprit. You could also test with MS Flow, if you have access, since it looks like you are using SharePoint Online - you may have better luck with it respecting your new lines. Or, you could leave the double eval with the pipe and look into whether you can use a replace function in SharePoint Designer to replace the pipe with an HTML break, for example - MS Flow has the substitute function that may also help you with that if you decide to try Flow....
    Hilary Stoupa

  • 09-16-2019 11:53 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    Hello Hilary, Your idea with an HTML break worked perfectly. I added
    in the rule and it worked perfectly. I am attaching 2 screenshots if you are curious what I did (or if it can be helpful to another user) Thank you so much! God Bless Stephen Ebling
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 11:55 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    I do have one quick question - If you look at my email that I received (screenshot above) You will see a space after 20000 - FP Halves for BBQ - Qty: 2(Space)x The other lines do not have this. Why does the first entry insert a space that the others do not? Is there a way to make it not do that? Thank you again Stephen Ebling
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 11:58 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    Also, it is showing the space on the field31 of the form. So it has to be infopath that is causing this. Thank you Stephen Ebling
    IT Project Manager/SharePoint Administrator
  • 09-16-2019 12:53 PM In reply to

    Re: Having trouble formatting repeating table info in an email

    Yeah, that's odd. Is the "x" something that is typed in? Or is there a rule adding that?
    Hilary Stoupa

  • 09-17-2019 07:00 AM In reply to

    Re: Having trouble formatting repeating table info in an email

    I added an extra static field to show the x
    IT Project Manager/SharePoint Administrator
Page 1 of 2 (22 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.