cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Workflow Variable (Drop Down List)

dwilliams
12-Amethyst

Workflow Variable (Drop Down List)

Gurus,
Does anyone know how to create a workflow variable with selectable values (drop down list). I am looking for this option for the following reasons:

String value need
From a workflow task, the user must select a string value, which is later passed into an IBA value. This user-selected value must be one of the IBA discrete set values.

Object need
At specific points in the process, the user is asked to specify a particular object (example: Change Request) from their task. Rather than asking the user to enter number, name, etc. into a string variable, I would like them to select the object from a list.

Thanks in advance for your help.

Dax Williams
Business Administrator, Windchill
Lifetime Products, Inc.
-<">mailto:->

[cid:image001.jpg@01C99D9B.6BB6BEC0]

5 REPLIES 5

You'll have to modify the task template in use. 9.0 or 8.0? Additionally,
no OOTB feature exists for this. However, basic web developers with
windchill workflow knowledge can pull this off.



When modifying the template, add a dropdown with no options. (Unless you
know they will not change which in that case add the options)



Then you'll have to do one of the following:



Create a voting option (normally rendered with radio buttons) but hide them
off the interface using cascading style sheets and dynamc html/javascript



Set up hidden input html fields where windchill variables can be written
into them. Use java script to build your option list. Add a javascript event
listener to your selectionb ox that stores the selected value in another
hidden input field (which upon submission can become a workflow variable.)
I'll give you a hint on this.when you add a task level variable and do the
initialize from/copy to stuff in a task but set the variable properties to
visible being false, it renders it as a hidden html input field in your task
page viewed by end user.



On the 1st option.using the hidden radio buttons.you have to write code to
retrieve their values and use that for your dropdown list. Use the event
listener on dropdown as previously described to select the radio button
programmatically (because it is hidden to user) based upon selected value in
dropdown.



There are of course other options, but they'll take longer and are more
complex.



Hope this helps. This would take me about an 30 mins/hour to setup -
longer for first timers.





Dave









_____
tdoan
1-Visitor
(To:dwilliams)

HelloDave,

Coud you please let me know how to use javascript to build the option list.

I did try <script type="text/javascript">.....</script>, <script language="JavaScript">.....</script> to insert the javascript into the html page of a workflow task, but nothing works, the task displays the whole codes as text.

Thank you very much for your helps.

Hoa Doan.

avillanueva
22-Sapphire II
(To:dwilliams)

See my presentation from PTCUser:
avillanueva
22-Sapphire II
(To:dwilliams)

Ok, for PDMLink 8.0, see my previous presentation:

I looked at your presentation and was wondering if you had any advice or specifc tricks if I was creating my own list of values. Do you know if its all the same steps?

Basically, I have a workflow variable that is currently a string and I wanted to limit it to a list of about 10-20 values. I have gotten around this using Booleans before and just setting a string variable depending on which items are selected.

Announcements


Top Tags