Question
Pegasystems Inc.
JP
Last activity: 8 Sep 2018 10:21 EDT
Key has not been registered error when trying to access a datacell of tablesection
I have been getting an exception with message as 'Key has not been registered for InstanceId: <xyz>', where <xyz> is my tablesection's UniqueId.
The error comes when I am trying to loop through the table with Index, and when there are lot of records in the target table.
***Edited by Moderator Marissa to add SR details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Standard Chartered Global Business Services
IN
I had a similar problem - table data getting dynamically created, using forloop, error appearing when there are huge records and the iterations goes for hours. I tried adding a WaitForCreate for the dataCell of the table (similar to your WaitForCreate for TS), before trying to fetch the value from the dataCell. For the past two days, have not seen an issue and it seem torun perfectly - hoping it got resolved now. Looks like implicit WaitForCreate does not work for dataCell and need to be explicitly called.
May be you can try this?
Pegasystems Inc.
US
This would happen if you had a table with, let's say, 10 rows and you attempted to access row 11. If you are certain that your index exists within the table, then you'd need to provide more detail as that could mean that the table is getting loaded dynamically or some other issue that would likely need hands on support.
Pegasystems Inc.
JP
Dear Thomas Sasnett,
Thank you for the clue! Knowing the reason when does this error come up is crucial. I will check this further on these lines.
By the way, the table in question gets loaded dynamically and has lot of records in it, (upper-capped at 999).
Thanks a ton!
Best regards,
Mangesh Walhe
Pegasystems Inc.
JP
Dear Thomas,
The index/key in question is index of a ForLoop that we have used to access rows of the target tablesection (TS).
The underlying table takes a lot of time to load, and I think that HTMLTableDesigner replica, i.e. TS would also take lot of time for creation and matching. The error occurs mostly when we have lot of records. So I think we are trying to search a record with an index, but the record for that index value is yet to be created.
To mitigate this possiblity, I have added a WaitForCreate for the TS before the ForLoop that accesses cells in it with a timeout of 1 min. Yet, we get the error which kind of undermines the above assessment.
Does WaitForCreate on Table sections return a true when the underlying table gets loaded, and not the table section? Or, is the above assessment wrong to begin with?
Best regards,
Mangesh Walhe
Pegasystems Inc.
JP
An update:
I had raised an SR for this, but according to their analysis, this is more of an implementation problem and not a product defect.
So, do we have any answers for this problem?
Accepted Solution
Standard Chartered Global Business Services
IN
I had a similar problem - table data getting dynamically created, using forloop, error appearing when there are huge records and the iterations goes for hours. I tried adding a WaitForCreate for the dataCell of the table (similar to your WaitForCreate for TS), before trying to fetch the value from the dataCell. For the past two days, have not seen an issue and it seem torun perfectly - hoping it got resolved now. Looks like implicit WaitForCreate does not work for dataCell and need to be explicitly called.
May be you can try this?
Pegasystems Inc.
JP
Dear Murugan H,
Thank you for sharing the information. We truely appreciate it.
We will implement, check and update the forum with the results.
Thank you once again for taking out time.
Best regards,
Mangesh Walhe
Pegasystems Inc.
JP
Adaps
IN
Below link might help you