Loading DataType Values into Custom State

Is it possible to load the values of a DataType into a Custom State? If so, how?

For example, I have DataType Sub-Categories. In the DT, I have a field called Sub-Category Name. I’ve created a custom state called Sub-Categories List and set it to Sub-Category type and as a list. How can I get the Sub-Category Name for each record into the State so that I have a list that looks like value1, value2, value3…

Yes, it is…

If so, how?

Use the workflow action ‘Set State’

For example, I have DataType Sub-Categories. In the DT, I have a field called Sub-Category Name. I’ve created a custom state called Sub-Categories List and set it to Sub-Category type and as a list. How can I get the Sub-Category Name for each record into the State so that I have a list that looks like value1, value2, value3…

If your custom state is of the Type Sub-Cetegory then it will contain s list of Sub-categories (not sub-categoru names, which presumably are ‘texts’).

If you want to access the Sub-Catregory names, you can do that from the Subcategory datatype - just refer to the name of the relevant Sub-Category(s).

Ok…still confused. My end result is to use the values in the custom-state value to populate an RG. So I’m trying to load the values from the DT Sub-Category Name field for each record in the DT into the custom-state to end up with a value “value1, value2, value3…” But I don’t see anything representing the Sub-Category DT in the dropdown for setting the value of the Custom State (unless I do a Do Search for) to (using a merge with maybe?).

Why not just populate the RG directly, rather than using a custom state? What is the purpose of this?

I was looking for a way to populate the RG different - for performance reasons. My setup includes a Tree that populates an RG that is used to select which items in a second RG are displayed at page load. The nodes in the Tree are all pre-selected when the tree is initially loaded. The first RG is updated as the nodes are selected. And the values in the first RG are merged at Page Load into a custom state to load the second RG. Then the user can select/unselect to filter the second RG. All works well - but performance is a little slower than i want due to using an API to handle the tree being displayed in a child-parent relationship instead of a parent-child relationship. I have to pause the page load to give the tree enough time to load the RG and then merge the RG into the custom state before the page finishes loading the second RG.

This topic was automatically closed after 70 days. New replies are no longer allowed.