Edit line validation on the fly (OpenInsight Specific)
At 20 NOV 2001 06:45:02AM tony hensby wrote:
I have an edit control which will have 2 type of input either a time in the format 13:00 or a session ID in the format ABCD.
Can I change the valid property on the fly from 'MT' when field is time type to 4A, when the field is session ID type.
suggestion welcome
At 20 NOV 2001 07:48AM Oystein Reigem wrote:
Tony,
(0)
I don't know if it can be done, and foresee some problems.
(1)
One solution would be for youto change your mind and have two different fields X and Y, and perhaps an additional field Z - a logical one - that knows which of the former two is used.
In you form have a checkbox or pair of radio buttons for Z, preceeding the controls for X and Y. Have the controls for both X and Y inactive. Then when Z is filled in (on its CLICK and READ handlers), check its value and set the relevant control of the X-Y pair active, and the other one inactive.
You can still have one field in reports, and other places where you present your data. Use a symbolic for those purposes.
(2)
A different alternative would be to write your own UDC for the field - a function that does the necessary validation and conversion. It's a bit different from how it's done in Arev. But people (and postings) on the lists can help you.
In case - how do you want your time data stored? Like displayed? Or as internal time values?
- Oystein -
At 20 NOV 2001 07:54AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
You should be able to set the CONV and VALID properties - failing that you can amend the Window common (see SENL passim) on the fly. We did this for AmSys a few years back.
World Leaders in all things RevSoft
At 20 NOV 2001 07:59AM Oystein Reigem wrote:
What if he wants to use the field in a report?
- Oystein -
At 20 NOV 2001 09:07AM tony hensby wrote:
thanks for responses.
I have decided on a variation of Oystein's suggestion
use two fields and make appropriate one visible which has the revelant validation properties already set
many thanks