Table data related question

I have a table and a button on a screen. When I press the button it takes and uses the HTML and sends the data to my email address. It works well except, if you are editing a cell and instead of pressing TAB or ENTER you simply click on another object on the screen. Now when it sends the data via email the last information you entered is not in the email. It is almost as if the TAB or ENTER key locks in the changes to the table.

So my first guess is that I need to add in something to the FOCUS LOST script setting of the table. Attached is the code that I have written so far. The only problem is that it still does not enter in the data. Because when I send it via email that line is still blank. So could you please assist and tell me what I am missing in this code. Thank you.

This code is in the FOCUS LOST of the table.

x = event.source.selectedRow y = event.source.selectedColumn table = event.source.parent.getComponent("Table") newdata =,y) table.setValue(y, x, newdata)

Now I can also tell you that i have viewed this information in CONSOLE and using the print command I can see that X, Y, and NEWDATA are correct values. Hope this is clear. Thanks again and have a great day.

Are you using an action event or one of the mouse events on your button?

Edit: Actually I was unable to reproduce your problem using either action or mouse events. Maybe you could give me a little bit more information?

Ok I have a screen, on this screen is a Table component and a Button.

When I press the button there is code under the button that takes the table and converts it to HTML and sends it out to an email address.

The table is setup as 4 columns with 6 rows, total of 24 cells.

If I click on cell 0,0 which is the first cell, I have it set that you can edit any cell. So now I enter a value in cell 0,0 and press TAB which now takes me to cell 0,1. Now I enter a value in this cell and press TAB again. So now I am at cell 0,2. If I type in a value here but I do not press either ENTER or TAB key but instead use the mouse to press the button, which is set to email this table using HTML. Then the data in the last edited cell does not get sent.

So lets say on the screen here are my 4 columns:

Quantity Part # Description Cost
5 123xyz Bearing

Now using the above information lets say the last cell I was on was 0,2 and as you can see the value is “Bearing”. If I do not press ENTER or TAB after editing this cell, when the HTML mailed document arrives in my email box I will get the Quantity Column, and I will get the Part # but the description will remain empty.

Hope this helps explain what I am trying to do and the problem I am having.

Thanks and have a great day.\

I was able to reproduce it, thanks. There will be a fix in the next version. In the mean-time you’ll just have to make sure and hit enter or tab before you press your button.

Besides having to press the ENTER or TAB to get out of the cell, is there any script or anything you can recommend that will help solve this as a bandaid patch?

And please feel free to add any clarification so that other can chime in if they want.

And finally is there any tenative release date for the next version?

Thanks and have a great day.

I am not sure if this is related to the problem here or maybe it was a problem that was fixed in a newer version. I am currently running PMI 3.3.0 I know some table component issues were fixed in 3.3.1 But anyway here is the newest issue that I have seen happen.

Again have the table 4 columns by 9 rows.

Start at 0,0 which is the top left most cell, enter data, using either tab or enter proceed to the next cell 0,1. Do this till you get at least the first 5 or more cells filled. Now using the cursor key or even by clicking on a cell containing previously entered data goto that cell. As you enter or alter data it will appear elsewhere on the table. at first I thought it might be my focus lost script so I deleted that and it still put text in a cell that I was not editing.

Can you see if you can duplicate this on your end?

Thanks and have a great day.

I can’t reproduce this one…

Are you running any script for the cellEdited event? I noticed in your previously posted script you have the x- and y-values swapped in your call to setValue(). Maybe you are doing the same somewhere else?

There are no other scripts running. As I stated when I first noticed the problem I took and eliminated all scripts running for any event on that screen. One thing I did not mention was that I also created another screen and simply places the same components to make sure that there was no other script running. The same problem occured there as well. When you tested this to see if it could be reproduced on your end, did you use the same version I am running or a newer one? This is why I asked if it might have been something that was already fixed between 330 and 331.

There doesn’t appear to be any changes that should affect or fix this issue between 3.3.0 and 3.3.1, but for what it’s worth I am indeed testing this out on 3.3.1.