cancel
Showing results for 
Search instead for 
Did you mean: 

HCM Forms - Adding and deleting lines in table using buttons

nikhilkup
Active Participant
0 Kudos

Hi,

My requirement is to add a new line and delete a line in HCM adobe form table.

Thanks,

Nikhil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nikhil,

You can use the below code and this is only in adobe form to add or delete rows in table dynamically.

Please follow the following thread:

[Dynamic Table Index Number |]

Regards

Pradeep Goli

Edited by: Pradeep Goli on May 28, 2009 7:22 PM

nikhilkup
Active Participant
0 Kudos

Hi Pradeep,

I tried that but still its not working . In HCM form which button to use as add and delete. I used the button from standard library.

Thanks,

Nikhil

Former Member
0 Kudos

Hi Nikhil,

Whether it HCM or WebDynpro or Offline Form, the Dynamic table with add and delete row is similar (when considering from Adobe Form side only), check your code once again as in the thread it is showing up mixed up code completely without any line breaks, I tried creating a new message by typing here the complete code but it is also displaying like the one displayed in the thread which I have added as link in previous message. And you must use only a normal button from library.

Regards

Pradeep Goli

Edited by: Pradeep Goli on May 28, 2009 7:43 PM

nikhilkup
Active Participant
0 Kudos

Hi Pradeep,

I think its working but now the issue is i cant see the new lines added but when i click 7 times it gives the error message that more than 7 lines not possible. it means the code is working, but y am i not able to see. i am checking in PDF preview.

Thanks,

Nikhil

Former Member
0 Kudos

Hi Nikhil,

If you see the code for the ADD Button you find


if (nNumRow == 7) 
{ 
xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3); 
}

Here you can remove the code completely or you can limit the number of rows providing to user, by changing the number "7". Change the code accordingly.

Regards

Pradeep Goli

nikhilkup
Active Participant
0 Kudos

Hi Pradeep,

I got that part regarding the error. But as i said earlier thats not the issue.

The issue is when i click 7 times i get the error that means the code is working but lines are not getting added. thats the problem. i dont see the lines added to the table. I only get the error after clicking on the button 7 times.

Any idea why the lines are not getting displayed, only the first initial line is displayed.

Thanks,

Nikhil

nikhilkup
Active Participant
0 Kudos

Also, I tried in a form using FLM tool, and its working fine there. but same thing is not working in HCM forms.

Thanks,

Nikhil

Answers (1)

Answers (1)

Former Member
0 Kudos

Perhaps your form XDP preview format property is defined as Acrobat x (Static) XML Form.

Changing this form property to Acrobat x (Dynamic) XML Form will solve the issue. You can find this setting as following.

In the menu of the FormDesigner go to: Edit -> Form Properties -> Defaults -> XDP Preview Format.