Expand my Community achievements bar.

SOLVED

Delete row option doesn't work and then becomes greyed out. Need help troubleshooting.

Avatar

Former Community Member

Hello!

I'm hoping that someone can please help me troubleshoot an issue I'm having with a table in my form. It has a menu associated with each row that allows you to add, delete, reset, etc. rows. The name of the table on the form is the Purchase Items table. It's the first table on the form.

Here are the steps to recreate the issue:

1. Create 3 rows in the table

2. Click the menu ("X") button associated with the first row.

3. Select "Delete this row". Nothing happens.

4. Click the menu ("X") button associated with the first row.

5. Select "Delete this row" again. Nothing happens.

6. Click the menu ("X") button associated with the first row. You'll notice that the "Delete this row" option is greyed out.

My best guess that the rows are being deleted in the background which would explain that if I have 3 rows, and "delete" 2, that my delete option is then greyed out because I believe there is logic in there such that if there is only 1 row then grey out the option to delete rows. I was planning to attach the file as I have seen others do but don't see the option. I'm happy to provide the file via email if that's easier. Thank you in advance!

Saskia

1 Accepted Solution

Avatar

Correct answer by
Level 8

I've posted the solution here:

http://www.fieldeffecttechnologies.com/AdobeForums/PCard.pdf

The instance manager methods were being given the wrong index of the row to work with. They need to be passed the index for the row that the button you are pressing is in (of course). Instead they were given some v8b index, which I honestly cannot decipher as to what that number possibly means. (Math.round((v3-v4)*v6........)???

Anyways, I fixed it up and also changed some of the logic in the sub menu to determine what's greyed out.

I like that feature! Might even show it to a client!

Kyle

View solution in original post

7 Replies

Avatar

Level 8

Try posting it here and I'll take a look.

Kyle

Avatar

Former Community Member

Thank you so much, Kyle! I posted just the table and the table within the form. I'm sure it's a big mess since it's beyond jury rigged.

Avatar

Correct answer by
Level 8

I've posted the solution here:

http://www.fieldeffecttechnologies.com/AdobeForums/PCard.pdf

The instance manager methods were being given the wrong index of the row to work with. They need to be passed the index for the row that the button you are pressing is in (of course). Instead they were given some v8b index, which I honestly cannot decipher as to what that number possibly means. (Math.round((v3-v4)*v6........)???

Anyways, I fixed it up and also changed some of the logic in the sub menu to determine what's greyed out.

I like that feature! Might even show it to a client!

Kyle

Avatar

Former Community Member

Hey Kyle,

Thanks for all your help. I'm hoping you don't mind if I bother you with one more question. I don't have a lot of coding experience so I'm probably overlooking something very simple here. I'm having issues with the "Reset fields in this row" functionality. It works, but it only resets the "Manufacturer Part #" field. I was looking everywhere in the code for this function (someone gave me the general code) but I can't find it anywhere! Can you please tell me where to look? If you don't have it anymore, let me know and I'll send it to you.

Thanks,

Saskia

Avatar

Level 8

Try using your debug console by pressing Ctrl-J in the preview tab. Even if you don't know how to code, you can easily see what the issue is most of the time. In your case, the code referenced a field that no longer exists. Simply renaming the field in the code would do the trick. I, instead, called the resetData method so you don't have to list every field.

Updated link.

Kyle

Avatar

Former Community Member

Wow! Thanks so much. I didn't even know there was a debug console!