Gloria Posted September 30, 2006 Posted September 30, 2006 I'm very inexperienced with functions, I'd like to include a script within a function but I don't know if I can do this. I have an inventory DB, my fields are "Retail Price", "Markup 33%", "Markup 35%", "Markup 40%" and "Variance". (I don't know if I need the Variance field, but I included it anyway)I want the function to tell me(either by beeping or displaying a message)when my "Retail Price" is less than any of my "Markup" fields.Can I do this?? Any help would be great. Thanks
Genx Posted September 30, 2006 Posted September 30, 2006 It would have to be a script, unless you want to look into using the event script plug-in (in which case there would be a "function" and a script). Either way, you would need to write a script which could just be: If[RetailPrice < Markup33p or RetailPrice < Markup35p or RetailPrice < Markup40p] Beep Show Custom Dialog[Title: "Markup higher than retail" ; Message: "Something" etc. etc. ]
Gloria Posted October 4, 2006 Author Posted October 4, 2006 Thankyou, Could I write this script into the field "Variance" so the script would happen automatically whenever there are values in the other fields?
LaRetta Posted October 6, 2006 Posted October 6, 2006 All fields are within the same table so an auto-enter (Replace) or standard indexable calculation would work just as well.
Inky Phil Posted October 6, 2006 Posted October 6, 2006 In a case such as this I Have used a calc field which checked for the condition. Case (retail price < markup33 or retail price < markup35 or retail price < markup40 ; "RETAIL PRICE TOO LOW"; ""). Don't forget to check the 'do not store....' checkbox. Place this field on the appropriate layout and it will display the message only when it applies Phil
Søren Dyhr Posted October 6, 2006 Posted October 6, 2006 To me does it look like even a native validation is up to it, what am I ignoring??? --sd
Inky Phil Posted October 6, 2006 Posted October 6, 2006 You are right Soren, validation would do it but I find the validation messages a bit of a blunt tool. Even when they have my own messages attached to them they always seem to annoy me somehow so I prefer a slightly more subtle approach. It is probably more of a fault with me than with the system Phil
Genx Posted October 6, 2006 Posted October 6, 2006 (edited) No i agree, except it's more a fault with the system. The message provided is like a critical error of some sort... Contuing on with my rant: They are annoying as hell, and it doesn't work properly, all it does is confuses the user -- heck it confuses me and as confusable as i am, that's just going to far :) Edited October 6, 2006 by Guest
Inky Phil Posted October 6, 2006 Posted October 6, 2006 Hey, steady on genx. You are straying into very dangerous waters there. I think that is the first time that anyone has agreed with me in here!! Phil
LaRetta Posted October 6, 2006 Posted October 6, 2006 Well, I agree as well, Phil. I was talking about a calc message ... all depends upon how critical it is. A large red message usually does the trick. I almost mentioned validation but my faith in field-level validation is shaken (it can fail anyway AND validation can frustrate/irritate Users) so I decided I couldn't recommend it with clear conscience.
Genx Posted October 6, 2006 Posted October 6, 2006 As for the LARGE RED message, you'd be suprised how daft users can be (as much as they're nice people, sometimes i think they're put on this world to annoy me) -- i use a size 72, bright red font to tell my user's they are in find mode and they still forget sometimes.
LaRetta Posted October 6, 2006 Posted October 6, 2006 Do not underestimate the intelligence of your Users, Genx. Other than a few lazy ones, most are quite bright and cabable of common sense. When they don't understand something, it is MY fault and not theirs. I repeat - my fault and not theirs. If your Users irritate you, you should find another profession (and I'm NOT saying that to be rude) but this is part of what we DO. This was explained to me once a long time ago (before dirt was invented) and I'm forever grateful because Users no longer frustrate me; I am there to serve them. And ever since I took that responsibility back, my designs are MUCH better. As I've said, messages usually take care of issues such as this but I would not trust a message alone to protect CRITICAL tasks. This is why we need a tool-kit brimming with techniques - I loosen and tighten my process like tuning a race car engine. BTW, I've worked with Users and design almost twice as long as you are old. Am I in a bit in a huff? 'No' towards you but 'yes' towards the subject. I dislike Developers blaming their Users. It reminds me of someone who blames their dog for running onto the highway ... the problem is NOT the dog but the (lack of) training. One must be smarter, that's all. As for Find Mode? That's what dedicated layouts are for. LaRetta
Genx Posted October 7, 2006 Posted October 7, 2006 Hey no, don't get me wrong, i've no issues with my user's per say. I have to say some of the work arounds they've forced me to employ have actually improved the usability of the system 10 fold. It only frustrates me that i sometimes have to repeat myself 3 or 4 times. On the upside, these are my beta testers and the more issues they have now, the less i have later, so i do quite a fair deal to accomodate them and take feedback. Further, as much as i would love to use dedicated layouts for find mode, the users want to be able to search through any and all fields, so the use of near duplicate layouts is questionable in terms of benefits in this case, though i do employ it in a couple of solutions. Anyway, i understand and respect your point of view, and will try and change mine a bit. Nevertheless, i think it's nice to have a whinge even while you're gaining from their feedback. Peace Out :)
Recommended Posts
This topic is 6624 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now