HI Prakhar,
The reason why your output is "key" instead of the member value is because you are using getMemberDisplay() instead of getMembers(). The getMemberDisplay() method does not return the value of the dimension member but just how it is displayed (eg. "key", "text" etc).
Assuming that the "REQUEST_ID" is unique in your data set and returns only one row after filtering, you can try the following script code:
var input_data=INPUTFIELD_1.getValue();
DS_1.setFilter("REQUEST_ID", input_data);
var myApproval = DS_1.getMembers("APPROVAL_1", 100);
myApproval.forEach(function(approval, index) {
TEXT_2.setText(approval.text);
});
The above approach worked for me with a BW BEx data source. Make sure in the Initial View of the data source you set the APPROVAL_1 dimension Members for Filtering option to "Only values with posted data".
You cannot use the option of a hidden Crosstab because a row must be physically selected with a mouse click in order for the getSelectedMember() method to return a value. By default, a Crosstab is displayed with no row selection and it is not possible set the default via scripting.
Let me know how you go.
Regards,
Mustafa.