on 02-10-2006 2:32 PM
Hi Form gurus,
I've got a form with a table with two columns, "value1" and "value2". Then, I've got a button that should copy all values from column "value1" to the column "value2".
The data hierachy looks like this:
[page1]
|
|--[table]
|
|--[row]
|
|---value1
|---value2
When I click the button, a script has to be executed, that copies the values. I tried the following script:
for (i=0;i<page1.table.row.all.length ;i++)
{
page1.table.row.value2<i>.rawValue=page1.table.row.value1<i>.rawValue
}
Unfortunately, nothing happens.
When I script
page1.table.row.value2.rawValue=page1.table.row.value1.rawValue
only the first row is copied.
Do you know how I have to address the repeated fields in the table?
Thx, Karsten
Hi Karsten
I'm afraid I cannot resolve your issue, but I can suggest that you use FormCalc instead of JavaScript for your table.
If you look for Accessors in the Designer documentation, you should find information on how to access repeating fields.
Kind regards,
Markus Meisl
SAP NetWeaver Product Management
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe I am not understanding your problem right, but I'va done some a little like this using subforms, indeed in Formcalc with a loop.
$ = 0
for int=0 upto $record.HOURLIST.nodes.length-1 step 1 do
$ = $ + data.#subform[0].Subform1.Subform2[int].UZo
endfor
$ stands for this, but could be replaced by anything else.
Hope this helps and regards, Hans
Hi Juergen,
I saw this topic and I am facing a similar problem. I hope you can help me
The functionality I want is the following. I have a R/3 table binded to my IF form
via context. I know this is a XML schema.
The table name = TABMATNR1, and it has the structure DATA and underneath that stucture 3 simple fields MATNR,MAKTX,KWMENG.
Now I want to fill a dropdownbox with javascripting. I have managed to create an object reference to a node but the functionality is not correct.
I hope you can advise me what todo.
Here is my coding:
<b>var oItems = xfa.resolveNode("xfa.record.TABMATNR1.DATA");
var nItemsLength = oItems.nodes.length;
for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++) {
dropdown.addItem(oItems.nodes.item(nItemCount).value);
}</b>
The result is that I get the three values of the first record of my table TABMATNR1
in my dropdownbox. I think it has todo with my reference object, it should not
be a record reference but a table reference.
For example I only want to populate the MATNR values of TABLEMATNR.DATA[*].MATNR into my dropdown box.
I hope you can help me!!
Regards Harrie
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.