Program Fix

Posted by markell trotter on 02-Aug-2016 10:48

Hi again community,

I need to my program to update fields when value is different instead of when blank. My goal is to look for changes in the misc field value instead of checking that it is not blank.

Here is a the snippet of my code that I need to change:

IF AVAILABLE clm-misc AND clm-misc.mfld-value <> " " THEN NEXT $SEARCH$.

Please let me know of any suggestions. Thanks

All Replies

Posted by Richard.Kelters on 02-Aug-2016 17:41

Hi Markell,

You should check the unknown value also,I woud suggest using the COMPARE statement instead to have more control. Some may even say the zero in numeric fields should (not) be checked but this you decide with your team/application.

Other possibilities:

There's an attribute,MODIFIED only available for native ui objects, that could indicate a change but this attribute is true when the user corrects a change to its original value.

Using the buffer-compare statement.

Using the before-table option on temp tables and checking changes, again using a compare statement.

Unfortunaltly there's no single right answer and you have to do some coding.

Richard

Posted by markell trotter on 03-Aug-2016 09:01

Ok thanks a lot Richard for your prompt response. I am going to try to implement these solutions now and will let you know my results as soon as possible. Again Thanks

Posted by markell trotter on 08-Aug-2016 09:04

Thanks Richard this information worked like a charm.

This thread is closed