Announcement

Collapse
No announcement yet.

Obtaining the Minimum and Maximum values across multiple columns in a row

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Obtaining the Minimum and Maximum values across multiple columns in a row

    I need some help. I have a situation where I have fields: FV_1, FV_2, FV_3, FV_4, FV_5, FV_6, FV_7, FV_8
    Each of these fields contains a numeric value set by the end user. The values will vary always. I need to be able to locate and display the minimum and maximum values from those fields into two new fields, call them Min_A and Max_A.
    I have been unsuccessful at trying to use php/sql code within events to locate the min/max values. Can anyone give me a pointer on how scriptcase handles this type of event or what macro can be used?
    Thanks!!!

  • #2
    Use the ajax on_change event on each field. Make a small function who returns the min value and one to return the max value so it can be called from the ajax event. Then on every change you call the function to decide the min/max and fill the appropiate fields. Beside onchange you might consider onblur, if the field looses focus the event triggers.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment

    Working...
    X