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.

Displaying % from Script Parameter number

Featured Replies

Here I am in Define Fields again. crazy.gif

I have buttons which figure discounts and apply by script to UnitPrice (number).

Script is: Set Field [ Round(UnitPrice * (1.0 - Get(ScriptParameter)); 2) ]

Buttons are percents and script parameters are: .05, .10, .15 on up to .50

I have a global field called DISC and want it to display as: 5%, 10% etc. Right now, it displays 05%, 1% (instead of 10) ... yuk. It applies the discount right, but doesn't display in DISC right. I tried:

Right(GetScriptParameter); 2) & "%" -- but on .10, it shows .1%

Right("00" & Get(ScriptParameter); 2) & "%" -- no.

There is no GetAsText function. I even tried using Filter. I tried both global number and global text and I'm unsure whether my problem is the script paramater number, the discount calc, or the set field.

Someone wanna give me a left/middle/right number to text lesson, please? wink.gif

DISC = (Get(ScriptParemeter) * 100) & "%",

where DISC is a calculated field with text result

  • Author

I copied your calc but kept getting it was an invalid Get function. I rechecked everything. I finally realised that it was a misspelling. It works perfectly now!

* 100 ... geez, yep I need more math classes in college if i want to be a programmer in filemaker. Thank you very much, Transpower. smile.gif

Hmmmm, Get(ScriptParamter) might be considered a 'typo' but Get(ScriptParemeter) would certainly be classified as a 'misspelling', don't you think? As you have recently pointed out to me:

I think we should strive for accuracy, clarity, and conciseness in posts. Proper English is indispensable for these goals.

Maybe in different parts of the world 'parameter' is spelled differently? Even if so, there is only one correct spelling of FileMaker Get(ScriptParameter) so yours was misspelled. shocked.gif

There is more I could say about this but I think I'll let it go as it stands. The Law of Compensation does indeed work. wink.gif

LaRetta

  • Author

Funny-Post.gif

I get straight A's in English and Spelling but don't know Math very well! Transpower knows Math but misspells! And the car driver, Mario Andretti, ran into the back of someone's car who was sitting stopped at a stop sign! He thought they were pulling out but then they didn't and he smacked them! A professional driver even goofed driving!! crazy.gif

Oh life is just too funny! And all of you that I think are geniuses are just people like everyone else. Except you're all very, very nice to spend your time helping someone like me; and you all know much more about filemaker. grin.gif

LaRetta: It was a typo! Sorry. My fingers don't follow my brain as well as they should.

  • Author

Let's see ... others misspell but you only mistype? And you're the only one that can judge between the two?! My mamma was a psychologist and she would call that a thinking error. tongue.gifyep.gif

And nope you'd better not make a comment about my mamma or i'll bring out the boxing gloves. grin.gif

He who lives by the sword, dies by the sword. Or spell checker. Whatever.

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.