JS Edit control - detecting modified

Gavin Foster omnislist at dataweaver.com
Fri Apr 27 10:50:12 EDT 2018


Hi Will,

There isn’t a ‘modified’ state for remote form controls as far as I know.

However, on a remote form, you can turn on the events you want the control (‘entry field’) to trigger.
i.e. You can turn on evBefore and evAfter.

On evBefore, you can store the value of the field.
On evBefore, you can test whether the new value of the field is the same as the value stored on evBefore.

Oddly, you can use a Local variable and it appears to keep the value held on evBefore.
i.e. it’s persistent and can be used on evAfter to perform the test.

HTH
Gav

> On 27 Apr 2018, at 10:35, Mike Matthews via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Indeed it does not.  You can fine tune which events are trapped.  
> 
> Jim Pistrang showed us this at EurOmnis, another reason to come to Euromnis 2018, which is in a new venue this year.
> 
> Visit www.euromnis.com <http://www.euromnis.com/> to get the best price on offer this year.
> 
> Mike
> 
> Mike Matthews, Managing Director, Lineal Software Solutions Ltd
> 
> Apple Reseller, Microsoft Partner, SQLWorks Business Partner
> phone: 01271 375999 | web: lineal.co.uk <http://www.lineal.co.uk/> | email: omnis at lineal.co.uk <mailto:mike.matthews at lineal.co.uk>
>> On 27 Apr 2018, at 10:14, will via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>> 
>> Ahh, so the trick here is that evAfter events are only fired if the data in the field has been modified, tabbing through the form does not fire evAfters like it does in the thick client... 
>> 
>> 
>> Best regards,
>> 
>> Will
>> 
>> 
>> Will Adkin / Software Development Manager
>> will.adkin at lineal.co.uk <mailto:will.adkin at lineal.co.uk>
>> 
>> <mailto:will.adkin at lineal.co.uk>Lineal Software Solutions 
>> 01271 375999 
>> Unit 7, Riverside Court, Castle Street
>> Barnstaple, Devon, EX31 1DR 
>> www.lineal.co.uk <http://www.lineal.co.uk/>
>> 
>> 
>>> On 26 Apr 2018, at 18:30, Andrew Stolarz <stolarz at gmail.com> wrote:
>>> 
>>> You need to enable the events for each JS Edit control. Click the Edit
>>> control, and select what events you want available in the property manager.
>>> 
>>> 
>>> Andrew
>>> 
>>> 
>>> On Thu, Apr 26, 2018 at 1:06 PM, will via omnisdev-en <
>>> omnisdev-en at lists.omnis-dev.com> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> This could be a simple question... I hope...
>>>> 
>>>> With a JS Edit control on a remote form is there a nice easy way to detect
>>>> if the user modified the data in the field on an evAfter event? or even
>>>> better, in the $control of the window?
>>>> 
>>>> #MODIFIED, as expected, is not much help... and $contents is not supported
>>>> in remote forms. Am I going to have to go deep into javascript to figure
>>>> this one out?
>>>> 
>>>> 
>>>> Best regards,
>>>> 
>>>> Will
>>>> 
>>>> 
>>>> Will Adkin / Software Development Manager
>>>> will.adkin at lineal.co.uk <mailto:will.adkin at lineal.co.uk>
>>>> 
>>>> <mailto:will.adkin at lineal.co.uk>Lineal Software Solutions
>>>> 01271 375999
>>>> Unit 7, Riverside Court, Castle Street
>>>> Barnstaple, Devon, EX31 1DR
>>>> www.lineal.co.uk <http://www.lineal.co.uk/>
>>>> 
>>>> 
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list