Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Format a number to dollars in Print output code ?

Featured Replies

In a layout.. I can make my Number field look like $0.00 fine.. But can't figure.. tried the commands I thought..

my totals look line 10 for $10.00

and 9.5 for $9.50

"Order #" & msg_id & ¶ &

msg_All_Items_c & ¶ &

"Total items $" & msg_SubTot_Order_c & ¶ &

"Discount $" & msg_Tot_Discount_c & ¶ &

"Taxable $" & msg_SubTot_taxable_c & ¶ &

"Tax $" & msg_Tot_Tax_c & ¶ &

"Total Order $" & msg_Tot_Order_c & ¶ & ¶

@LaRetta, Rod is creating a calc in the parent table that summarizes the records of a child table (that's what he wants to do).

@Rod, where are the numbers not preceded with a "$", because in the above calc, they are--it's part of the label. Are you referring to the field, "msg_All_Items_c"? I recall explaining how you could create a calc in the child table for each line item and then gather them in the parent using List ( ). Is this your "msg_All_Items_c" calc field? Is this the field that does not have the proper number format?

If I understand your problem correctly, you would like a calculation that will do the work for you to format 9.5 as $9.50.

Here is what I use. I define the following custom function (with FM Advanced) with the function argument named Amount. You can adapt this as you like to implement it directly in your calculation if you don't want to or can't define a function.

-Tom

"$" &

Let(

[cents = 100 * Round(Amount;2);

centString = GetAsText(cents)];

Case(

cents = 0; "0.00";

cents < 10; "0.0" & centString;

cents < 100; "0." & centString;

Left(centString;Length(centString)-2) & "." & Right(centString;2)

)

)

"$" &

Let(

[cents = 100 * Round(Amount;2);

centString = GetAsText(cents)];

Case(

cents = 0; "0.00";

cents < 10; "0.0" & centString;

cents < 100; "0." & centString;

Left(centString;Length(centString)-2) & "." & Right(centString;2)

)

)

Note that this won't work with negative amounts. If that's OK, you could do the same thing with just:


Let (

amt = Round ( Amount ; 2 )

;

"$" & Int ( amt ) & SerialIncrement ( ".00" ; 100 * Mod ( amt ; 1 ) )

)

Yes, I agree, and yet he insists. There's another post that dealt with this, in which I suggested reporting from the child table.

  • Author

Yes, I couldn't figure.. Thats where I am stuck

I just need to cut a piece of code.. explain what i am doing or showing a hunk of code.. is where my inexperience comes in..

History.. I spent almost 2 years paying programmers to do, and I ran out of monies.. I am figuring most of his code.. I am learning. The economic suck me dry..

  • Author

Hi..

I don't know... how far your support goes here... solve some of our.. issues.

Your remembered me previews post here.. I have created a video.. plus a text file attached..

In video, have taken this application and cut off the screens all the other non related items only to show and streamline my problem

Video Link

Some how i think my problems is when I create records in OrderItems, or the portal records... trying to get the ProductInventoryNo from my Inventory file setting the key relationship field

Can attach my source files?

Thank for your consideration... My app is actually done... except for this one item.

Well you know!

problem.txt

  • Author

Here is that grabportal zip back you sent me.. I have added my Inventory file.. and some notes in the layout Order... Is the closes thing to what I am having problems with..

Sorry// I just lurked all the forurm just can 'nt seem to get Hoq a list showing one thing will pop other fields in my OrderItems?

sept14-RodM.ZIP

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.