SeedCodeHierarchy

Using Example Two

SeedCodeHierarchy.UsingExampleTwo History

Hide minor edits - Show changes to output

Changed lines 3-4 from:
Example Two of SeedCode Hierarchy shows a "filter" field where you can type a few letters of a company name in order to restrict the top level records (companies) to just those companies that match the filter.
to:
Example Two of SeedCode Hierarchy shows a "filter" field where you can type a few letters of a company name in order to restrict the top level records (companies) to just those companies that match the filter. When you integrate this into your file you can filter on any field in your top-level table.
Added lines 19-23:
!! What happens when the filter is blank?

When you clear the filter we revert to the hierarchy's default contents. These are defined in the script "Set Default Contents". You can edit that script to change this default behavior.

If you want the hierarchy to be empty when the filter is emptied, edit the script "Filter Hierarchy" and find the comment "If so, show the default hierarchy records." Delete the next step where we preform a script and instead set the variable $$Hy_Show to 0 (i.e. to zero).
Changed lines 17-18 from:
-> Then, in the following SetField step, specify the Target Field to be your version of a field like "Company
to:
-> Then, in the following SetField step, specify the Target Field to be your version of a field like "CompanyIsActive". Then set the Calculated Result of the same SetField step to be whatever value indicates "activesness": probably the word "active" or a "1".
Changed lines 7-11 from:
Remember that you don't have to show a filter field to your users in order to filter the hierarchy; you can have buttons that do the same thing. So if you wanted to have a button that showed all the companies with open jobs, for example, and "jobs" were in your second level of data, you could have a button that ran a script which did the following:

-> Set the global variable $$Hy_Show = "Active Jobs". Then called the script "Build Hierarchy { Open Top or Open All }"

You'd then edit the script " "Build Found Set for Top Level { Show }" as follows
to:
Remember that you don't have to show a filter field to your users in order to filter the hierarchy; you can have buttons that do the same thing. So if you wanted to have a button that showed only active companies, for example, you could have button that called the script "Build Hierarchy { Open Top or Open All }" with a script parameter like this:

-> Let ( [ $$Hy_Show = "Filter" ; $$Hy_FilterBy = "Active" ] ;  "" )

You'd then edit the script
" "Build Found Set for Top Level { Show }" as follows:

-> Find the comment that says "Filter by different fields if necessary."

-> After that you'll see an Else If () statement that currently says $$Hy_FilterBy = "Something Else"; change "Something Else" to "Active".

-> Then, in the following SetField step, specify the Target Field to be your version of a field like "Company
Changed lines 7-11 from:
Remember that you don't have to show a filter field to your users in order to filter the hierarchy; you can have buttons that do the same thing. So if you wanted to have a button that showed all the companies with open jobs, for example, and "jobs" were in your second level of data, you could have a button that ran the following script.
to:
Remember that you don't have to show a filter field to your users in order to filter the hierarchy; you can have buttons that do the same thing. So if you wanted to have a button that showed all the companies with open jobs, for example, and "jobs" were in your second level of data, you could have a button that ran a script which did the following:

-> Set the global variable $$Hy_Show = "Active Jobs"
. Then called the script "Build Hierarchy { Open Top or Open All }"

You'd then edit the script " "Build Found Set for Top Level { Show }" as follows
Changed lines 5-7 from:
Under the hood, we're searching for these records in the script "Build Found Set for Top Level { Show }"
to:
Under the hood, we're searching for these records in the script "Build Found Set for Top Level { Show }" and you'll likely want to read more about how this script builds [[found sets]] of top level records.

Remember that you don't have to show a filter field to your users in order to filter the hierarchy; you can have buttons that do the same thing. So if you wanted to have a button that showed all the companies with open jobs, for example, and "jobs" were in your second level of data, you could have a button that ran the following script.
Added lines 1-5:
!! Tips for showing different found sets of top level records.

Example Two of SeedCode Hierarchy shows a "filter" field where you can type a few letters of a company name in order to restrict the top level records (companies) to just those companies that match the filter.

Under the hood, we're searching for these records in the script "Build Found Set for Top Level { Show }"
(855) SEEDCODE
[email protected]
Follow us: