I'm certain there's a simple solution and missing something fairly obvious here. I am attempting to feed a multi source tree control from a procedure that produces XML. Despite having what I thought would be a hierarchy from two BY fields, I'm instead presented with the Parent repeated for every child.
I'm currently on 8105M. I tried to follow the example presented in the release manual (https://infocenter.informationbuilders.com/wf81rel/index.jsp) , but couldn't achieve what I was seeking.
Procedure: How to Add a Tree Control to an HTML Page Using an Existing Procedure
You can select an existing procedure to add to the tree control in an HTML page. When you select a procedure, it should use fields from the parent/child hierarchy and be set up as follows:
TABLE FILE file SUM FST.dispfield BY ParentUniqueField BY UniqueField BY datafield ON TABLE PCHOLD FORMAT XML END
Is the name of the data source.
Is the field whose values display in the tree control.
Is the field that represents the parent for the parent/child hierarchy (PROPERTY = PARENT_OF).
Is the field that represents the unique IDs for the hierarchy members (PROPERTY=UID).
Is the field whose values are passed as the parameter value.
On the Canvas I click on the component of the control, went to Properties and set the Number of Levels to (2); on the Parameters section, the control had the corresponding portions of the Levels, selected the first level, went to the Settings tab and applied the first level of the hierarchy, then did the same for the second level.
I wasn't able to find my answer in searching the forums. I'd love to see a simple CAR file example if at all possible. I'm guessing there is a simple nuance I'm missing, please forgive my ignorance on this one. Many thanks for any assistance.This message has been edited. Last edited by: Mike Williams,
WF Version 8105
Does the data source have a parent/child hierarchy? I don't think that the CAR file does.
Of course (as usual) I can find ZERO documentation on how to create a parent/child hierarchy This message has been edited. Last edited by: Hallway,
If I recall correctly the CAR Master does.
A Janky example that uses multi-select OR's with the CAR:
-DEFAULT CAR=_FOC_NULL; TABLE FILE CAR BY CAR.ORIGIN.COUNTRY BY CAR.COMP.CAR WHERE ( CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR)).COUNTRY:. ) AND ( CAR.COMP.CAR EQ &CAR.(OR(FIND CAR.COMP.CAR IN CAR)).CAR:. ); ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT XML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * $ ENDSTYLE END
So create a new HTML canvas doc and drag a report then reference that procedure on the HTML canvas, reorder the params with country first, choose the multi source tree so the &CAR is appended to the &Country. Verify the Properties tab is set to 2 levels, then goto params to check settings for the two elements of the hierarchy.
WF Version 8105
Check out this link: Procedure: How to Populate a Multi Source Tree Control then click Using Tree Controls then click Populate a Multi Source Tree Control
This will guide you through how to populate the tree using any existing master file.
Really appreciate it Hallway.
WF Version 8105
No problem. I'm glad I was able to find the docs and help out.
|Powered by Social Strata|