- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 05:49 AM
So we have a number of Catalog items that are order-able. They can range from Windows/Linux servers to database servers ...etc.
We've successfully created them in the catalog and are starting to create their forms and create the workflow for them. I was hoping to have a single workflow for all of the items that follows a single idea. Please see the image below.
Each catalog item has a field that is hard-coded into it, a Service Identifier. We don't have it as a choice field or anything like that, just a simple Text field that we set a default value into and make it ReadOnly.
I'd like to create a Switch/Case statement that allows me to put in a condition for each separate identifier. I'm able to create the Switch statement now, but it makes me select a Service Identifier field on a specific Catalog Item.
Is there a way to make it possible to select the Service Identifier field from EACH item and create the Switch/Case statement for that? I could simply add a condition on the Switch/Case but I'm still left with the Always action. Something like this:
switch serviceIdentifier:
case "this one":
do blah;
case "that one"
do blah2;
- Will
It's not an Out-Of-The-Box field. It's a field that we have put in ourselves. Message was edited by: William Karavites
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 08:31 AM
Ok, so if your user is to have no interaction with this field, then why make it a variable in the first place?
Why not just do evaluations in the workflow that ask what Catalog Item it is and branch logic from there (using IFs or Runscript)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 05:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 06:00 AM
I took a look at those and when it has me select a Variable, it makes me select one for a single catalog item. Not the field in general, see the above image. I need to be able to have a switch/case statement on the variable across all items. Not just for an instance of that variable in a single item.
Even when I select one of those variables, it can't auto-fill it with the choices because it doesn't come from a Choice list, just a text box that we put a value into. That also forces it to have an Always action which I wouldn't need to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 06:08 AM
So you have a variable that appears on each of these Catalog Items. Is it the same variable (as in, present via variable set), or just named the same?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 06:10 AM
It's not currently in a variable set, but we could put it into one.