Jump to content

Search the Community

Showing results for tags '2 decimal'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Community Forums

  • The New FileMaker Platform
  • Community Resources
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPad and iPhone
    • FileMaker and the Internet
    • FileMaker Pro Advanced 18
    • FileMaker Pro Advanced 17
    • Legacy FileMaker Platform Discussions
  • FileMaker Server Administration
    • FileMaker Server 18
    • Zabbix Server Monitoring
    • FileMaker Server 17
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • Brain Food
    • Security Concepts
    • The Left Brain
    • Upgrading & Migration
    • Data Analysis
    • Development Standards
    • The Separation Model
    • Relational Database Theory
    • Damaged / Corrupt File Problems
    • Bar Codes (Printer, Scanners, Software)
    • Hardware & Networking
    • OS Level Database Automation
    • Product Ideas
  • JavaScript Integration
  • FMForums Affiliates & Sponsors
  • FileMaker Classifieds
  • FM Forums Operations
  • FileMaker Friday Night Chat's Topics

Blogs

There are no results to display.

There are no results to display.

Categories

  • White Papers
  • Infographics
  • Samples
  • Solutions
  • FMGo
  • Plug-Ins
  • Tutorials

Product Groups

  • Workplace Innovation Platform
  • Site Advertising
  • Development & Hosting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Title


Industry


Location


Interests


Website URL


Skype


MSN


Yahoo


OS Version

Found 1 result

  1. I'm having a bit of an issue with an ESQL query. I would like it to always return 2 decimal places on the value retrieved. This is a currency field, and "$45.5" looks weird. I am generating a list of payments to displayed (via a global variable in the UI) to the user, so it should look money-like. It's a simple 'here's what you currently have set up' kind of display. So here's the basic query (I believe folks here are familiar with the GFN() and GTN() functions - they are just a way to robustify the query in FileMaker): ExecuteSQL ( "SELECT '$' || " & GFN ( Payments::Amount ) & " FROM " & GTN ( Payments::aaPaymentUUID ) & " WHERE " & GFN ( Payments::aLineItemID_fk ) & " = ? "; "" ; "" ; $ID ) I have also tried various versions of this without luck (using "numeric(10,2)", or "decimal(10,2)"): ExecuteSQL ( "SELECT '$' || CAST ( " & GFN ( Payments::Amount ) & " as decimal (5,2) )" & " FROM " & GTN ( Payments::aaPaymentUUID ) & " WHERE " & GFN ( Payments::aLineItemID_fk ) & " = ? " ; "" ; "" ; $ID )But I always get responses like (yes, they should be the same - it's an equal payment calculator, so the last one might be different): $125.5 $125.5 $125.5When I would like it to be: $125.50 $125.50 $125.50Anyone have a quick answer as to how to get each record value to have 2 decimal places after it? I have shied away from doing in FileMaker string manipulation because I thought the ESQL fix would be easy; and it would save some steps in the script. But maybe it's easier to do it in FM and just reprocess the whole list.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.