Fancy formatting of row in repeating item table? - InfoPath Dev
in

InfoPath Dev

Fancy formatting of row in repeating item table?

Last post 04-08-2013 08:18 AM by RobSil1976. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-06-2013 03:55 PM

    Fancy formatting of row in repeating item table?

    Hi there,

    I have a repeating table that has Quantity, Description, Unit Price.  I am trying to rearrange the fields in another view so that I can "pretty format" the text.  For example... "New Tires(4)@$4.33" (<descr>(<qty>)@<price>).  Is there an easy way to do this with string addition in a calculated field or do I need to nest numerous concat functions? (or is there an even easier way?)

    Thx,

    Robin

  • 04-07-2013 09:24 AM In reply to

    Re: Fancy formatting of row in repeating item table?

    You shouldn't have to nest your concat:

    concat(desc, "(", qty, ")@", price)

    I guess the one issue you'll run into is formatting price - it is likely a decimal data type. As such, you may just want to use one expression box (calculated value) for everything up through "@" and another expression box for the actual price.

    Hilary Stoupa

  • 04-07-2013 10:36 AM In reply to

    Re: Fancy formatting of row in repeating item table?

    Thanks Hilary! :) Is there a limit to how many variables you can pass into that method? R.
  • 04-07-2013 08:55 PM In reply to

    Re: Fancy formatting of row in repeating item table?

    Yes, but you can just add concats if you need more - e.g. concat(concat(field1, field2, field3, field4), field5, field6, ...)

    Patrick Halstead
    Project Manager at Qdabra
  • 04-08-2013 08:18 AM In reply to

    Re: Fancy formatting of row in repeating item table?

    I even managed to get the dollar amount displaying properly... my final equation is as-below...

    concat(my:Description, " @  (", my:Quantity, " x $", round(my:UnitPrice * 100) / 100.00, " each)")

    Please note that the divide symbol "/" has a space before after (considers it to be xpath if you don't).

    Hope this helps others. :)

    R.

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