cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown inside Table - Anyone please?

Former Member
0 Kudos

Hi Gurus,

              This is my first post. Im getting started with Adobe Interactive Forms and Im stucked with something. I need to put a dropdown inside a table cell, I am able to do it but I dont know how to do the binding. When I use a simple dropdown (not in a table) its allright but inside a table I have this binding:

$record.ITEMS.DATA[*].AUXILIAR_COMBO.DATA[*] and in each line of the table the dropdown shows all values of the same combo from other lines.

Im attaching a screen if it helps. Its A WD ABAP offline scenario.

Please can anyone help me with this?

Thanks all!

This is the binding:

$record.ITEMS.DATA[*].AUXILIAR_COMBO.DATA[*]

This is the result...AUX1 and AUX2 is ok to appear in the first line, but AUX3 is from the dropdown of the secondline....it seems to be merging all the values in AUXILIAR_COMBO.DATA[*] in all dropdowns:

Accepted Solutions (1)

Accepted Solutions (1)

sandeep_katoch
Contributor
0 Kudos

Hi Federico,

Please try to define the needed values separately for each drop down list.

Else you can include scripting in calculate event based on the available values.

Pseudo code will be like

If table1.fieldx then

action code

Endif

All you need to do is to choose the table filed and do the scripting.

Rgds,

Sandeep katoch

Former Member
0 Kudos

Hi Sandeep,

            Thanks a lot for your time. Indeed, Im defining diferent values for each dropdown in the sub tables as you can see here:

In each item line, i have a sub table for each dropdown with different values. But when I do a binding, in all dropdowns all values  (AUX1, AUX2 and AUX3) are displayed. Cant be done with binding?

Im new to the scripting in Forms, can you explain me a bit more of your interesting solution?

This is my dropdown:

Thanks again for your time again.

Regards,

Federico

sandeep_katoch
Contributor
0 Kudos

hi Federico,

Can you tell me some things regarding your form:

1: Are the values of the dropdown constant, I mean the form can have only these values i.e aux1 aux2 and aux 3.

2: Are the cells in the table fixed or they can increase and decrease?

if the answer is true then there is no need to define it in interface. you can directly give the values in the dropdown by selecting object-value in the specific dropdowns.

If these are dynamic then you can follow this approach

http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000587.html

You can also refer to http://saptechnical.com/Tutorials/AdobeForms/Dropdown/Page2.htm

If still you face any problem please post in here. I will surely help you.

Right now I am not having access to SAP so will not be able to tell you with screenshots of my custom development.

Rgds,

Sandeep Katoch

Former Member
0 Kudos

Hi Sandeep,

       Thanks again for your help! The answer is no..they are not fixed values...for each item line y have different values in AUXILIAR_COMBO table. The item lines will not be fixed either. So I have N line items, with a dropdown in each line with N Values.

  

      This is my context:

          ITEM 1 ¬

                       |_ AUXILIAR_COMBO - values -> AUX1

                                                                    ->AUX2

         ITEM 2 ¬

                      |_ AUXILIAR_COMBO - values -> AUX3

                                                                    ->AUX.....

         ITEM N......

    

     The binding i have is the same in the link you sent from saptechnical (but it only works when i work with dropdowns in headers...not in tables )

     Then my dynamic binding is $record.ITEMS.DATA[*].AUXILIAR_COMBO.DATA[*]

     This is my dropdown called COMBO_AUX (binded to AUXILIAR_COMBO element from context):

Maybe it cannot be done with the usual binding and i need to use javacript as you say. But I do not know in which event from de the dropdown and how to read the correct values for each line as i have this path .ITEMS.DATA[*].AUXILIAR_COMBO.DATA[*] so i must know in which line Im standing an read the AUXILIAR_COMBO of that line and populate the dropdown COMBO_AUX.

Thanks again..its very kind of you to help me with this. sorry for my english

Regards,

Federico

sandeep_katoch
Contributor
0 Kudos

Hi Federico,

As I told you I am not having access to SAP till monday so I will try to provide exact solution may be on monday.

But if it is kind of urgent for you then you can probably take a clue from this thread

http://scn.sap.com/thread/1656748

http://scn.sap.com/thread/1532922

I dont know how much it will help you.

Rgds,

Sandeep Katoch

Former Member
0 Kudos

Thanks Sandeep...Im looking foward to your solution on monday!! Meanwhile I will look at the 2 links you sent me in order to see if there is any clue of how to solve this problem.

I think the only way of solving this is with script in an event, and not with the ussual binding as I did with the header dropdowns. But I need to know in wich event of the dropdown and how to recover the values from context to populate the dropdowns of each line.

Thanks again!

Regards,

     Federico

sandeep_katoch
Contributor
0 Kudos

Hi Federico,

You have to write a script in preopen event of the dropdown

if(Condition_variable== 1)

{

this.addItem("Value", "Binding-specifyitems");

// Here you need to provide the value which you want to //see in dropdown and the next Binding-specifyitems will be the value that is incorporated with the value you have specified.

// For eg in your case AUX 1 will be value and pls check in the binding tab of dropdown what is the text specified for this value

}

Endif

Or if the table is dynamic

Try this

Declare two variables open and count

for open = 0 upto  (count+Maxvalue of table rows) step 1 do

// eg open = 0 upto count=10 step1 do

if(Condition_variable== 1)

{

this.addItem("Value", "Binding-specifyitems");

Endif

Endfor

Hope this helps.

Rgds,

Sandeep Katoch

Former Member
0 Kudos

thanks sandeep! i solved it with your help! very kind of you! thanks again!

Regards

sandeep_katoch
Contributor
0 Kudos

You are most welcome.

Former Member
0 Kudos

HI Federico / Sandeep ,

I am also working on Adobe offline scenario. I am facing same problem as Drop down List inside a table.

I am very new to java script i don't know how to control the drop down list values for particular row .

can you please let me in which event i need to write the code and if possible send me the code. it is little bit urgent .

Can you Please help on this .

Thanks,

Regards,

Lokesh k

Answers (0)