Home » Developer & Programmer » Forms » Master-child enable/disable button in child
Master-child enable/disable button in child [message #84531] Sat, 27 March 2004 09:13 Go to next message
new learner
Messages: 2
Registered: March 2004
Junior Member
Hi
I need help ASAP. I have a master child relation (many other blocks and relations but am mentioning only the relavant portion). Both master and child r multi record blocks.

Child block has buttons that r displayed only once for the whole block - not multiple times.

Requirement is to enable disable buttons, based on a value in the master record.

The two blocks are in two different windows.

The way I implemented it, I am setting these properties in

post-query of master block
post-query of child block

when-new-record-instance doesnt fire unless the cursor goes to that record. - so its not helping me.

The problem is:
Master records: M1, M2, M3
Child records : M1 doesnt have children
M2: M2C1,M2C2, M2C3
M3: M3C1,M3C2

Now based on the status field of the master block, i enable/disable child block's buttons.

status for M1 : Pending
status for M2 : Pending
status for M3 : Processed

If processed enable the button else disable.

Now, bcoz its a master child, autoquery, (cant change autoquery and deffered), everything gets queried automatically.

Because the last post-query to fire is of Child M3C2, and status of M3 is 'Processed', button gets enabled. But actually, current record is M1 (first record of the block after querying)- and its status is 'Pending'. But the button is still enabled. Which breaks the rule.

As these two blocks are on two different windows, user can see the button enabled without navigating to the child block.

Any help is appreciated.
Please reply back if u need further explanation. I need help urgently - so please think abt it.
Re: Master-child enable/disable button in child [message #84551 is a reply to message #84531] Mon, 29 March 2004 10:19 Go to previous message
jan
Messages: 71
Registered: August 2002
Member
Since you want the buttons in the child block to be enabled/disabled depending on the value in the master block. you can write a trigger on the master block's when-new-recordi-instance and then depending on the value of status enable/disable the buttons in child block.

i;m not sure if this is what you are looking for,

hope this helps.

Jan
Previous Topic: Multithreaded app in Forms 4.5
Next Topic: Retrieve old value from List Item
Goto Forum:
  


Current Time: Mon May 06 12:42:53 CDT 2024