Home » Developer & Programmer » Forms » Preventing Form from thinking it's in 'changed' mode (Forms 10g)
Preventing Form from thinking it's in 'changed' mode [message #526070] Sat, 08 October 2011 00:06 Go to next message
dmillerp
Messages: 2
Registered: October 2011
Junior Member
Simple question. I have a form with a block with a base table. This base table has some fields that I do not display, but instead display the 'user friendly' lookup value (via sql to a reference table). So my block has base table items and display items.

Now when I query the form it always thinks the records have changed because the non-base table items were fetched and placed on the form.

I've tried the code in the POST-QUERY and NEW-RECORD-INSTANCE triggers and both think that I'm trying to update base table data, which I'm not.

What suggestions do you have to prevent the form from thinking it's changed??
Re: Preventing Form from thinking it's in 'changed' mode [message #526107 is a reply to message #526070] Sat, 08 October 2011 05:32 Go to previous messageGo to next message
Littlefoot
Messages: 21817
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Two options I can think of:
  • The first one is to
    set_record_property(:system.trigger_record, 'block_name', status, query_status);
    at the end of the POST-QUERY trigger
  • Another one:
    set_item_property(<item_name>, item_is_valid, property_true);


The first option might be simpler if there are many items you'd have to set valid.

[Updated on: Sat, 08 October 2011 05:33]

Report message to a moderator

Re: Preventing Form from thinking it's in 'changed' mode [message #526123 is a reply to message #526107] Sat, 08 October 2011 09:49 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
Go with the second - it always works. I've found that the first isn't guaranteed.
Re: Preventing Form from thinking it's in 'changed' mode [message #526401 is a reply to message #526123] Tue, 11 October 2011 00:01 Go to previous messageGo to next message
dmillerp
Messages: 2
Registered: October 2011
Junior Member
Thanks, it looks like the set_item_property works...partially. It appears as I navigate through a set of records on a block some have their status = QUERIED while others show status = CHANGED. I assume it's one or two annoying items that somehow think they have changed. Can anyone thing of how I can isolate which particular item(s) is getting changed when I'm querying??
Re: Preventing Form from thinking it's in 'changed' mode [message #526403 is a reply to message #526401] Tue, 11 October 2011 00:07 Go to previous message
Littlefoot
Messages: 21817
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Run the form in debug mode?

P.S. Or try with QUERY_STATUS of the SET_RECORD_PROPERTY - maybe it'll be OK in this case.

[Updated on: Tue, 11 October 2011 00:07]

Report message to a moderator

Previous Topic: Validating the Item
Next Topic: Slow performance using OLE2 reading xls file
Goto Forum:
  


Current Time: Sun Aug 11 08:58:36 CDT 2024