Parent_Changed_State - BaseData_Set

Determines if any of the DD object's parents have been changed by a find operation

Type: Property

Access: Read-Only

Data Type: Boolean

Parameters: None

Syntax
 Property Boolean Parent_Changed_State

Read Access: Get Parent_Changed_State to BooleanVariable


Description

Parent_Changed_State is a read-only property that determines if any of the DataDictionary object's (DDO's) parents have been changed by a find operation. This can be used in advanced cases for determining the changed status of a DD. It returns true, if one of the server DDOs (the parent DDs) have found or switched records.

Three properties are used to determine a DDOs changed status: Changed_State, Parent_Changed_State and Should_Save.

Changed_State: is true if any of the columns in the DD have been changed. This change is usually triggered by changing a value in a data entry object (DEO). The DDO that owns the DEO is marked as changed.

Parent_Changed_State: is true if one of the DDO's parent DDOs has changed records through a find. When a parent record is found, the parent DDO's Changed_State will be false (because after a find there are no changes) and the main DDOs Changed_State will be false (because there are no changes in any of the DDO values). The main DDO's Parent_Changed_State will be true, indicating that there is a change in the DDO structure (a parent has changed).

Should_Save: Should_Save looks at the entire DDO structure and determines if a save is needed for the DDO. To do this, it must traverse up the DDO structure and see if there is anything to save. It starts with the main DDO and checks Changed_State. If false, it checks Parent_Changed_State. If false, it then checks all parent DDOs by sending Should_Save to each parent. The parent DDOs will perform the same test traversing up their parent DDOs as needed. As soon as a change is found, Should_Save returns true. If the entire DDO upward structure is tested and there are no Changed_States or Parent_Changed_States, Should_Save will return 0.

If you are dealing with a DDO structure that returns Should_Save as true when you think there is no change, you can test Changed_State and Parent_Changed_State in the various DDOs to determine what is causing this to appear changed.

Should_Save and Parent_Changed_State are read-only properties. Changed_State is read/write. If you set Changed_State to true, Parent_Changed_State is not changed. If you set Changed_State to false, Parent_Changed_State is also set false. The DDOs maintain Changed_State and Parent_Changed_State. You should never need to set Changed_State.