How to Leverage the Calculation Power in Nested Sets

Navigation:  Set Databases > How to Empower a Set with Calculation Capabilities >

How to Leverage the Calculation Power in Nested Sets

Previous pageReturn to chapter overviewNext page

Use Case

In addition to adding calculation inside a set, QDV7 offers the capability to transmit data from a set to its nested set(s) (refer to Nested Sets). That is why these sets are called Parent and Child(ren).

A value in a calculation cell defined as output field in the parent set is transmitted to the input whose name matches it in the child set:

 

CHILD

 

 

 

PARENT

 

 

 

 

 

 

 

 

Input

Output

Parent's input

 

 

The received value can be consumed in the List of Articles as Quantity, Description, Rebate, etc or in the Set data.

Thru input in the form of the Parent set, you can change the primary input even in connected mode.

When the parent is inserted into the minutes, the input value propagates downwards to the children.

 

Procedures

The steps succeed as follows:

 

CHILD

 

PARENT


DEFINITION    (Edit mode)

Sheet3: define input

Articles sheet: assign the input to a field

Data sheet: define a description, unit, quantity, etc

Articles or Data sheet: assign Set IDs

Sheet3: define input(s) and link the content of each to the child input
Sheet3: define a visible area

 

return

USE      (Connected mode)

 

The child is inserted with the calculated value

Enter value(s) in the Sheet3 form

Insert the parent in the minutes

 

Detailed Definition procedure:

1.In the Child sheet3, define an input from a cell value (refer to How to Create Input Fields);  the value does not matter

2.Paste the variable in a cell of the Articles sheet (e.g. qty of pair rings) (refer to How to Consume Variables)

3.To choose a final description, unit, etc, enter in the Data sheet Parent_description, etc (refer to How to Parameterize the Insertion into the Minutes)

4.Switch the child set database in connected mode (except if the parent is in the same database)

5.In the Parent set Articles sheet, enter Set IDs, even though there is one child; to each input variable in the child QDV7 associates as many output variables in the parent as there are IDs or children

6.In the Parent Sheet3, define inputs from cell values (refer to How to Create Input Fields, right-click each cell and select Define as output field; QDV7 opens a selection box with all the defined outputs

write variable2

7. In the Parent Sheet3, define a visible area (refer to How to Create Input Fields).

 

In the example, Length is the name assigned to a child's cell:

Source (parent): QDV_Output_<Name>_<Set ID>

Target (child): QDV_Input_<Name>

 

RULES

- The item Define as output field requires that the set nest another set (refer to Nested Sets); otherwise the message 'No child set available' pops up

- An output can be consumed once

- Several outputs can be consumed by the same cell

- You can invoke several outputs in a sheet, hence you can change the values in the sets.

 

Detailed Use procedure:

1.Switch the parent set database to Connected Mode

2.In the Parent Sheet3, enter the value to pass to the child (e.g., quantity of pair rings)

3.Insert the superset (refer to How to Insert an Article or a Set into a Section of Minutes); the child(ren) are inserted with the description and values from the parent

 

Twins can be catered in different ways. For this purpose, define two parent's inputs in step 6; this enables the bidder to pass different values (here the quantity of pair rings) in one time:

setdepth2

Another way is to insert a parent with one child two times with different parent's inputs (step 9).  

 

Sample of Child Sets Inheriting Values From a Parent Set

Any user can select in the parent set through a combo box in which child set will be taken the articles to paste when dragging and dropping a parent set. This selects also some articles in the selected set.

PROCEDURE

Paste the Industry Demo Database from <installation folder>\QDV 7\Samples\databases_of_articles\ to a directory in the meta-directory described in How to Create & Manage the Databases.

Paste the Industry Demo Database from <installation folder>\QDV 7\Samples\databases_of_sets\ to a directory in the meta-directory.

Open Industry Demo Database.grp.

In Edit mode, make sure that the Path Numbers match (2 in the source file).

In Read-only mode, in the Parent Set>Sheet3, enter a quantity and select a type (and the possibility of integrating articles shared in the parent).

 

EXPLANATIONS

Type and Quantity are passed down using the Input and Output functions.

The articles are selected through formulas based on the entered type and the quantity fields.