Decimal places issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Decimal places issue

Patrick Larkin-3
Lasso 8.6


I generate a portion of a PDF using this code:


[var('theText') = field('Assignments::Letter FTE')]
[var:'text4'=(PDF_Text:$theText, -Type='Paragraph',  -Font=$MyFont, -Leading=15)]
[$MyTable->(Add:$text4, -Col=2, -Row=1, -HorizontalAlignment='left')]


The field "Assignments::Letter FTE” is a field in Filemaker Pro 12 which is a calculation field.  The result is set to “Number”.  I set the formatting in Filemaker to show two decimal places.  So a 1 should show as 1.00.  When Lasso writes this to the PDF, only 1 appears.  I tried using the [Decimal->SetFormat] and the [Decimal] tag to no avail.  I’m sure it has something to do with the number being cast as a string or something but I don’t know what to do!  Anyone?  

Thanks.








PLEASE NOTE:  My e-mail address has changed to:  [hidden email]
——
Patrick Larkin
Application Management Group
Information Technology
Bethlehem Area School District
https://www.beth.k12.pa.us


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Decimal places issue

Bil Corry-3
Try casting the number to a string: [var('theText') =
string(field('Assignments::Letter FTE'))]

And you may need to format the number prior to casting it to a string.

- Bil

On Fri, Jun 5, 2015 at 3:45 PM, Patrick Larkin <[hidden email]>
wrote:

> Lasso 8.6
>
>
> I generate a portion of a PDF using this code:
>
>
> [var('theText') = field('Assignments::Letter FTE')]
> [var:'text4'=(PDF_Text:$theText, -Type='Paragraph',  -Font=$MyFont,
> -Leading=15)]
> [$MyTable->(Add:$text4, -Col=2, -Row=1, -HorizontalAlignment='left')]
>
>
> The field "Assignments::Letter FTE” is a field in Filemaker Pro 12 which
> is a calculation field.  The result is set to “Number”.  I set the
> formatting in Filemaker to show two decimal places.  So a 1 should show as
> 1.00.  When Lasso writes this to the PDF, only 1 appears.  I tried using
> the [Decimal->SetFormat] and the [Decimal] tag to no avail.  I’m sure it
> has something to do with the number being cast as a string or something but
> I don’t know what to do!  Anyone?
>
> Thanks.
>
>
>
>
>
>
>
>
> PLEASE NOTE:  My e-mail address has changed to:  [hidden email]
> ——
> Patrick Larkin
> Application Management Group
> Information Technology
> Bethlehem Area School District
> https://www.beth.k12.pa.us
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Decimal places issue

maxwellk2
In reply to this post by Patrick Larkin-3
FileMaker’s display formatting, set via Inspector->Data->Data Formatting, won’t get picked up by Lasso, Lasso will only see the raw data.

Try ether of these custom functions instead, as they will generate the raw data I think you’re after...

        http://www.briandunning.com/cf/679
        http://www.briandunning.com/cf/615

-Max


> On Jun 5, 2015, at 6:45 AM, Patrick Larkin <[hidden email]> wrote:
>
> Lasso 8.6
>
>
> I generate a portion of a PDF using this code:
>
>
> [var('theText') = field('Assignments::Letter FTE')]
> [var:'text4'=(PDF_Text:$theText, -Type='Paragraph',  -Font=$MyFont, -Leading=15)]
> [$MyTable->(Add:$text4, -Col=2, -Row=1, -HorizontalAlignment='left')]
>
>
> The field "Assignments::Letter FTE” is a field in Filemaker Pro 12 which is a calculation field.  The result is set to “Number”.  I set the formatting in Filemaker to show two decimal places.  So a 1 should show as 1.00.  When Lasso writes this to the PDF, only 1 appears.  I tried using the [Decimal->SetFormat] and the [Decimal] tag to no avail.  I’m sure it has something to do with the number being cast as a string or something but I don’t know what to do!  Anyone?  
>
> Thanks.
>
>
>
>
>
>
>
>
> PLEASE NOTE:  My e-mail address has changed to:  [hidden email]
> ——
> Patrick Larkin
> Application Management Group
> Information Technology
> Bethlehem Area School District
> https://www.beth.k12.pa.us
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>