Announcement

Collapse
No announcement yet.

Select Field Lookup SQL reference other field value

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Select Field Lookup SQL reference other field value

    I am running Scriptcase V8.

    I have 2 dropdown select fields, named "probeFailure" and "componentFailure"

    All of my dropdowns reference one table named "MWDDaily_Table_Selections".

    This table has 2 columns, being "Label" and "Field".

    The select field "probeFailure" is working correctly with the following code:

    SELECT Label FROM MWDDaily_Table_Selections
    WHERE Field = 'probeFailure'
    ORDER BY Label

    I want the "componentFailure" to have code referencing the selection or value from the first dropdown as it's key or field to reference. In my mind, i see it looking something like:

    SELECT Label FROM MWDDaily_Table_Selections
    WHERE Field = value.probeFailure
    ORDER BY Label


    I basicly want the secondary dropdown (copmonentFailure) to be dependant upon the first dropdown selection value (probefailure).

    I am a newbie to this, so please go easy... This is probably a simple issue, but would help me tremendously!

    Thanks!

  • #2
    Try this for example:


    SELECT Label FROM MWDDaily_Table_Selections
    WHERE Field = '.{probeFailure}.'
    ORDER BY Label

    Comment


    • #3
      Thank you for the simple, but valuable advice!!

      Used your recommendation and added an Ajax reload to the first Select field, and it worked like a charm!

      (i did remove the periods inside of the quotes. Dont know if i needed to or not, but its working)

      Thanks!

      Comment

      Working...
      X