- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 07:41 AM
Hello,
I need help to make a catalog item with 1 select box for category and 1 for subcategory. They should get their values from already exsiting variable on the universal request table.
The issue i'm facing is that on the universal request my subcategory variables are dependent from the variable you choose on the category.
I need to make the same logic on my catalog item.
Anyone as done it before ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 12:38 PM
OK. I still don't have the table or Create New to see that form directly, but you can see what needs changed in this example. Both variables will be the type of Lookup Select Box. I'll use the names v_category and v_subcategory to try to prevent confusion with similarly named table fields. Both variables will be setup like this:
v_category will have a Reference qualifier that looks like this (change the name or element values if they don't match your choice list records).
v_subcategory will have a Reference qualifier and Variable attributes that look like this:
The Reference qualifier includes the dependency, and the Variable attribute ensures that the list of choices is updated when the Category variable changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 12:38 PM
OK. I still don't have the table or Create New to see that form directly, but you can see what needs changed in this example. Both variables will be the type of Lookup Select Box. I'll use the names v_category and v_subcategory to try to prevent confusion with similarly named table fields. Both variables will be setup like this:
v_category will have a Reference qualifier that looks like this (change the name or element values if they don't match your choice list records).
v_subcategory will have a Reference qualifier and Variable attributes that look like this:
The Reference qualifier includes the dependency, and the Variable attribute ensures that the list of choices is updated when the Category variable changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 01:58 PM
for the v_category i'm getting a lot of values that are not related to my universal u_category and for sub i'm not getting anything ;(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2023 01:08 PM
Trying to replicate what must have been done in your environment, I create a choice field named u_category on my universal_request table and added these 3 choices:
I then created another choice field named u_subcategory, dependent on Category, with these 4 choices:
I confirmed on the Universal Request record that I only see these Categories, and the appropriate Subcategories for each Category. Does this look similar to your environment so far?
I then created 2 variables on a Catalog Item exactly as I pictured in my previous response. When I fill out the Catalog Item request form, the Category and Subcategory variables behave exactly like the fields on the Universal Request form. Since yours doesn't, is the field added to your table named something other than u_category? Does something else look different than what I've pictured?
You can also try filtering a list view of the sys_choice table until you get the intended Category choices. It should look like this:
Once you have the list view filtered correctly you can right-click the last breadcrumb on the filter and choose Copy query then paste this into the reference qualifier on your category variable inside single quotes following the javascript tag as pictured.