Anyone have this problem?
I have a fairly complex datacard for a virtual file that, i believe, since upgrading to 2022sp5 has been acting up. It seems that when my addin runs from getting the CardInput hook, the value that the program sees is the previous value that was on the card. I've seen it happen with checkboxes and combobox lists- selecting a value produces "" and then selecting it again finally makes it to the program. on checkboxes, checking it off produces 0 and unchecking gives a 1. For some of them, deleting the card control and readding it has fixed it. but on others this fix has not worked. And not every combo/checkbox is doing this, just a few.
i found SPR 1211895 'CardInput hook does not get right variable value' that is 2 years old with no fix, and i cant see the details or vote on it because they borked the customerportal.
just wondering if anyone had a real fix
thanks
-Tom
PDM API getvar on CardInput gets the previous value
Re: PDM API getvar on CardInput gets the previous value
I have a similar one for a folder card using the IEdmEnumeratorVariable5.GetVar method.
SPR 1111411
Desc: GetVar Method (IEdmEnumeratorVariable5) for folder returns values from deleted folder while actually value is empty
My specific issue was that if a folder of the same name existed in the 'recycle bin' of the vault, the API would get the value for that folder card instead of the non-deleted one. I'm assuming this is because the SQL Table ID of the deleted folder was smaller than the ID of the non-deleted one.
So, with all of that said. Do you have a file with the exact same name in the vault recycle bin from the same folder?
SPR 1111411
Desc: GetVar Method (IEdmEnumeratorVariable5) for folder returns values from deleted folder while actually value is empty
My specific issue was that if a folder of the same name existed in the 'recycle bin' of the vault, the API would get the value for that folder card instead of the non-deleted one. I'm assuming this is because the SQL Table ID of the deleted folder was smaller than the ID of the non-deleted one.
So, with all of that said. Do you have a file with the exact same name in the vault recycle bin from the same folder?
Re: PDM API getvar on CardInput gets the previous value
Solution S-065813 shows an example of how to use the CardInput hook. One interesting thing about it is that when the OnCmd handler is called with the CardInput command type, the subsequent code is wrapped in a lock statement. If you aren't doing the same, it wouldn't surprise me that you are having problems. The user interface thread for the card is likely different than the thread where the add-in is running. Without some sort of synchronization, the two threads can see the overall system in two different states. If you are already using 'lock', start commenting out code until you have a simple example (that still misbehaves) you can post here. If your example includes a CEX export of your vault setup, that would help as well.