- 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 06:11 AM
Hmm. Not sure if I understand the problem. But how about making a custom field on Requested Item(RITM) which I guessing you are using. Having the service identifier fill in that field. Then you should have no problem doing a switch in that field.
or am I missing somethingf?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 07:52 AM
What I don't understand about the Switch/Case block in the workflow is how it relates to the Choice list for the variable.
I had just created a Variable in a Variable Set and connected it to a table which held the possible values. I had entered in a few test values and they still didn't show up as options when I went back to the Workflow Editor to create the Switch/Case block.
Even if I do get that get figured out, I still have the problem of setting a default value for each item. If an item is in a variable set, then you can't set defaults per item....correct?