cancel
Showing results for 
Search instead for 
Did you mean: 

Changing text for dropdwon using scripting!

Former Member
0 Kudos

Hi All,

The actual values that are coming dynamically from the table as below

Key Text/Desc

001 text5

002 text4

003 text3

004 text2

005 text1

006 NoRat

I need to display the drop down box as below with numbers descending exactly opposite to Key

Key Text/Desc

001 5 text5

002 4 text4

003 3 text3

004 2 text2

005 1 text1

006 NoRat(No Value)

Now the code i.e., changing the scripting is in bold and I have added the script code which is not bold (normal).

Please let me know what is the wrong with below code..The dropdown is showing as %No%VALUE%

var cnt

cnt = 5

for j=0 upto length - 1 step 1 do

// The code comment 5 4 3 2 1 for each of the 5 lines in DropDown vlaues

$record.BODY.T_ELEMENTS.nodes.item(idx_element).T_COL_CELL.nodes.item(idx_col).T_FIELD.nodes.

item(idx_field).T_VAL_VALUES.nodes.item(j).VALUE_TEXT.rawValue = concat( cnt, Null(), $record.BODY.T_ELEMENTS.nodes.item(idx_element).T_COL_CELL.nodes.item(idx_col).T_FIELD.nodes.

item(idx_field).T_VAL_VALUES.nodes.item(j).VALUE_TEXT.rawValue )

$.addItem( $record.BODY.T_ELEMENTS.nodes.item(idx_element).T_COL_CELL.nodes.item(idx_col).T_FIELD.nodes.item(idx_field).T_VAL_VALUES.nodes.item(j).VALUE_TEXT ,

* $record.BODY.T_ELEMENTS.nodes.item(idx_element).T_COL_CELL.nodes.item(idx_col).T_FIELD.nodes.item(idx_field).T_VAL_VALUES.nodes.item(j).VALUE_EID )*

endfor

Please let me know if we can change the content as above.

Regards

Srinivas

Edited by: srinivas aare on Feb 17, 2010 10:27 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

For other purpose in the form? So you cannot sort these in backend? Well, I have never faced such a situtation, but ok.

Why don´t you then create a new node in the interface in your form, copy the items there and sort these in backend? This is very fast and easy. And this is the right way how to do things like this.

Otto

OttoGold
Active Contributor
0 Kudos

Is there a reason why you insist on scripting? Why don´t you do that in your backend as was recommended in your second thread? Tell us why don´t you follow the given advise if you want any other. Otto

Former Member
0 Kudos

Dear Otto,

These texts are used for other purposes also. Not only for this population of Dropdown boxes.

So I wanted to try in scripting.

Reagrds,

Srinivas