[SOLVED] Getting the Description Value from Listbox
Hi
I have a Listbox having vehicle names and is bound to a Variable namely &vehicle.
'Vehicle_ID' is being passed to the &Vehicle but the Display Value is Coming from 'Vehicle_desc'.
In WF7 Switching ON 'Send Display value' gave us a Variable &vehicle_text which had the Display Value of option selected in the listbox but still passes the Vehcile_ID value to the &Vehicle.
IN WF8, switching on 'Send display value' is sending 'Vehicle_desc' to the &vehicle hence the SQL Pass through is not getting the correct filter.
The Idea is to Use Vehicle_ID(&Vehicle) in the SQL Pass through and but also fetch the Display value to show in report footer.
Need Help!!
Example:
Vehicle_id - 5 has vehicle_desc - BC403 MAX
I need to use 5 in the SQL but display BC403 MAX in the report footer.This message has been edited. Last edited by: Tamra,
Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
January 11, 2017, 08:06 AM
Avinash
quote:
The Idea is to Use Vehicle_ID(&Vehicle) in the SQL Pass through and but also fetch the Display value to show in report footer
Use Hold file and -READFILE Concept to read value in a variable and use it in footer.
Thanks! @vi
WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
January 11, 2017, 08:23 AM
iBeny
How would this give the Description of the Value Selected in the Listbox?
Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
January 11, 2017, 09:01 AM
Squatch
There was a lengthy discussion on this forum about "Send Display value" a few months ago... the following might be useful for you:
I am using below Javascript Function which i wrote as workaround, use it with the ValueChanged Event of the Listbox and then bind the value to a Variable, use the Variable in the report filter section, we can mark this thread as closed.
function listbox_subengine() { var list_v = document.getElementById('listsubeng') var list_vLength = list_v.options.length; var strfinal1 = ""; for (var j = 0; j < list_vLength; j++) { if (list_v.options[j].selected) { var str2 = list_v.options[j].text; strfinal1 = strfinal1 + str2+","; } } strfinal1 = strfinal1.substr(0,strfinal1.length-1); document.getElementById('edit5').value = strfinal1; return strfinal1; }
Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster