Skip to Content
author's profile photo Former Member
Former Member

Hierarchy variable Key and Text in Textbox

Hallo colleagues,

By one customer I get the problem to get Key and Text of one variable which is set in prompt (selection) window (jpg: selection). This variable is planing element 93400 Energy.

After I do a selection, I get only the key 93400 in textbox, but not the text "Energy".

Script in DS_1 in field "OnResultSet":

TEXT_1.setText(DS_1.getVariableValueText("ZPV_ZPLANEL_001"));

The query definition (filter part) is in screen "QD_Filter"

In Screen "Result DS" is the result after I click on Ok in selection window of Design Studio.

How can I get key and text of that variable into textbox?

Thank you.

Result in DS.JPG (10.5 kB)
QD_Filter.JPG (54.6 kB)
Selection.JPG (45.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 21, 2016 at 02:46 PM

    Hi Tatiana,

    Please try the following code:

    TEXT_1.setText(DS_1.getVariableValueText("ZPV_ZPLANEL_001") + " " + DS_1.getVariableValueExt("ZPV_ZPLANEL_001"));

    Regards,

    Mustafa.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sreenivasulu Dasari

      Hi,

      here is the detail of my characteristic definition, display tab (sorry, I work in german system):

      In the field "Text View" I can only select "short text" and "middle text". I tried both selections and unfortunatelly for both it doesn't work with get VariableValueText/Ext. Actually it works, but I get 93400 twice:

      short text:

      middle text:

      result:

      However, it works with getStaticFilterText.

      Best regards and thank you for your help again, Tatiana

      short_text.JPG (16.8 kB)
      middle text.JPG (17.7 kB)
      Duble_key.JPG (9.9 kB)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.