[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Edit line validation on the fly (OpenInsight Specific) ==== === At 20 NOV 2001 06:45:02AM tony hensby wrote: === {{tag>"OpenInsight Specific"}} 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 [i]two[/i] different fields X and Y, and perhaps an [i]additional[/i] 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 [i]one[/i] field in reports, and other places where you present your data. Use a [i]symbolic[/i] 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 [i]passim[/i]) on the fly. We did this for AmSys a few years back. [url=http://www.sprezzatura.com" ]The Sprezzatura Group[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === 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 [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=8464917F50A60EC485256B0A00408C68|View this thread on the forum...]]