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.

Complex Calculation or I'm just thick...

Featured Replies

Hello!

I am going insane trying to get the following function:

I need FM to automatically fill in a Bank transfer sheet. I’ve made a layout with all the fields set out to fill the sheet. These fields are all single Global fields because I can’t get the numbers in the right place on the layout otherwise.

What I want to be able to do is, enter a figure in the Amount field in any format (see below) and get FM to sort out the Cents (.00) via a calculation in Script Maker and add the Amount to the global fields.

E.G:

12534 to 12534.00

15684. to 15684.00

48652.4 to 48652.40

The reason for this is that the Bank sheet always needs the Cents as well.

I’m not very good at explaining my problem.

Please see in the Attached file.

Thank you [color:red]VERY much in advance.

Best regards.

Ron

Banksheet_Autofill.zip

Edited by Guest

12534.00 = 12534

It's only a matter of formatting the display. First, make your field a NUMBER field. Then, in Layout mode, format the number as decimal with 2 decimal digits.

  • Author

OK, but how do I get it to enter the info in my Global fields?

I know its going to be a loooong thing in ScriptMaker but any advice would be greatly appreacated.

Regards

Ron

I don't understand your question - and I did not understand your file either. Why do you want to replicate the entered data? Perhaps you should explain what you actually need this solution to do, in terms of what is coming in and what do you need to come out.

  • Author

Sorry for the comlicatons. :

Here a new updated file.

In the Amount Global field is a figure and in the Message Global field there is a Message, when Go is pressed then it should send those fields to the Globals (Amount .1, Amount .2...Message.1, Message.2... at the botom of the Layout.

Many Thanks!!!

Best regards.

Ron

Banksheet_Autofill.zip

Edited by Guest

I think I am beginning to understand - you want to print the data on a paper form with fixed position for each character, is that it?

  • Author

Yeeessss... : Sorry to make it so complicated. :

You're help would be GREATLY apprecated.

Regrads

Ron

I wouldn't make it a scripted matter but instead a job done with cut up repeating calc'fields...

--sd

BSFillCalc.zip

OK, then you don't need a script or a pile of global fields - just one repeating calculation field for each field to be exploded.

PrintFixChar.fp7.zip

Great minds, etc.. But you have a problem with zeros, e.g. "100" shows up as "1__".

Edited by Guest

  • Author

@comment Thank you very much... that did the trick. :

@Søren Dyhr Thank you anyway.

I probably have, I just smacked it together - and continued to other tasks.

I think this fixes the flaws in reasoning:

Let(tt=

Middle ( Right("00000000"& Int(Extend ( aNumber )*100);9) ; Get ( CalculationRepetitionNumber ) ; 1 );

Case(tt or Extend ( aNumber )>10^(7-Get ( CalculationRepetitionNumber )) ;tt))

--sd

Create an account or sign in to comment

Important Information

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

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.