How Do I Link A Part Number With A Part Description Seguir

0
Avatar
Legacy Poster

so in prompt design, I have a drop down list to select a part number... how can I link the Part descripton to the part number. So, when a part number is selected, the part decription is auto-filled with description text..

5 comentarios

0
Avatar
Shotaro Ito
Moderador
Acciones de comentarios Permalink

Hi Tim,

Bartender's dropdown list can link to only one substring.
What you can do is cram all fields to that one substring and break down by VB Script.
(This technique works only from BarTender 9.3 or later, Professional edition or above.)
This sample shows how to get 3 text value from one dropdown box.

[attachment=43:DropDown.png]
[attachment=42:Select3ValuesFromaDropDown.zip]
(for BarTender 9.4)

Create a hidden text "TXT_Selected" for dropdown source, on above label.
Create a dropdown box in user prompt, linked to "TXT_Selected".
In Dropdown property > List items tab, Uncheck [Use same values for display text and Sub-strings].
In Display text, input dropdown options. In Sub-string value, input values separated by comma.
Like..

[SQL]
Display Text | Sub-String Value
--------------------------------
C01 | C01,Link,16
C02 | C02,Zelda,19
C03 | C03,Ganon,2000
[/SQL]

Create 3 texts. for each text, set source as [Label object string] of "TXT_Selected".
Using VB Script to extact desired column from value.
More options > VB Script > OnProcesData, set script like this

For 1st text
[code]Value = Split(Value,",")(0)[/code]

For 2nd text
[code]Value = Split(Value,",")(1)[/code]

For 3rd text
[code]Value = Split(Value,",")(2)[/code]

hope that helps!
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

[quote name='Shotaro I -Seagull Support' timestamp='1319091231' post='855']
Hi Tim,

Bartender's dropdown list can link to only one substring.
What you can do is cram all fields to that one substring and break down by VB Script.
(This technique works only from BarTender 9.3 or later, Professional edition or above.)
This sample shows how to get 3 text value from one dropdown box.

[attachment=43:DropDown.png]
[attachment=42:Select3ValuesFromaDropDown.zip]
(for BarTender 9.4)

Create a hidden text "TXT_Selected" for dropdown source, on above label.
Create a dropdown box in user prompt, linked to "TXT_Selected".
In Dropdown property > List items tab, Uncheck [Use same values for display text and Sub-strings].
In Display text, input dropdown options. In Sub-string value, input values separated by comma.
Like..

[SQL]
Display Text | Sub-String Value
--------------------------------
C01 | C01,Link,16
C02 | C02,Zelda,19
C03 | C03,Ganon,2000
[/SQL]

Create 3 texts. for each text, set source as [Label object string] of "TXT_Selected".
Using VB Script to extact desired column from value.
More options > VB Script > OnProcesData, set script like this

For 1st text
[code]Value = Split(Value,",")(0)[/code]

For 2nd text
[code]Value = Split(Value,",")(1)[/code]

For 3rd text
[code]Value = Split(Value,",")(2)[/code]

hope that helps!
[/quote]
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

well it sorta helps... but I dont need 3 different choices for a part description. I just want to link a static part description to a part number. Is there an alternate or easier way ??
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

I tried this .. and it worked !!!

Posted 26 July 2011 - 09:49 PM


There's no option to automatically update user prompt value, correspond to prompt input by user.

What you can do is update value after prompt is closed by Vb Script onPostPrompt event.

attached is a simple format, which allows user to select a value in dropdown (G / Y / R), then update a label text (to Green / Yellow / Red) depends on selected value.

Give sharename to 2 texts ("TX1" for dropdown source, "TX2" for another text)
and create a text object with Event control VB Script source.

in OnPostPrompt Event:
'Update substring TX2 depends on TX1's valueIf TX1 = "G" Then TX2 = "Green"If TX1 = "Y" Then TX2 = "Yellow"If TX1 = "R" Then TX2 = "Red"

in OnAutoSelected event:
'give default value of this textValue = "Script"

The sample works BarTender 8.01 Professional or later.
There might be another way of achieving your requirement.

Attached File(s)
OnPostPrompt.zip (12.87K)
Number of downloads: 13
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

I'm on 10.1 and this is not working for me. I get a script error "subscript out of range". Is there a better way to do this with the newer Bartender version?

Iniciar sesión para dejar un comentario.