November 21, 200421 yr Here I am in Define Fields again. 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?
November 21, 200421 yr DISC = (Get(ScriptParemeter) * 100) & "%", where DISC is a calculated field with text result
November 21, 200421 yr 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.
November 21, 200421 yr 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. 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. LaRetta
November 21, 200421 yr Author 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!! 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.
November 22, 200421 yr LaRetta: It was a typo! Sorry. My fingers don't follow my brain as well as they should.
November 22, 200421 yr 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. And nope you'd better not make a comment about my mamma or i'll bring out the boxing gloves.
Create an account or sign in to comment