Calculated formula - InfoPath Dev
in

InfoPath Dev

Calculated formula

Last post 08-18-2013 03:47 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-15-2013 10:12 AM

    Calculated formula

    Hello,

     

    I have a textfield in InfoPath that concat a field from a repeating table.

    The textfield would look like this  "  12; 40; 80 ; "

     

     SharePoint Library display:

    Number of Deals (column1 )

    12; 40; 80; (row 1 )

     

    How can I make it look like this within a row?

    Number of Deals

    12

    40

    80

     

    I used this formula

    =LEFT([Deals],INT(FIND(";",[Deals])-1)) but it returned the first number. How can I get all the numbers and display them vertically?

     

    Thank you.

  • 08-16-2013 07:25 AM In reply to

    As far as I know you can't do that in SharePoint by default. It's either a row or a column.  You'll have to perhaps play around with SP designer to get it looking like you want.

    In Infopath you could do the following:

     Add a field to your form called CarriageReturn.

    The CarriageReturn text box should be hidden and have it's default value set in the function builder to:
          a.  Type an open quotation      "
          b.  Hold down the Control key and hit the Enter key
          c.  Type a close quotation       "

    Then use this in your formula.

  • 08-16-2013 10:40 AM In reply to

    Thank you for your suggestion and insight.

     

    I have resolved the solution by creating an xml file to creat a new line.

     

    So I used EVAL to get the values of the repeating table field and concat it with a new line xml. It looks great in my infopath form but when the data is submitted into SharePoint, it looks like this

    "  $203 $303 "

     

    The new line did not get added in. My goal is to get SharePoint to show the currency format $ in front of the number.

  • 08-18-2013 03:47 PM In reply to

    May I humbly suggest a better design?

    Use a proper repeating control and stop hacking strings. Then, map the data as individual rows to a SharePoint list. Display this along with your InfoPath metadata, using a dashboard form that pulls from both. You can do this without code. Our YouTube.com/Qdabra weekly webinars have highlighted dashboards for repeating data several times in the last 6-7 months.

    Send us email and we'll send you a sample. :)

    But, please, stop the bad practice string hackery...

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.