In my connector, I iterate by pushing a button in a table until I reach the execution count. I noticed that the 3rd time the button is pressed the QAction no longer gets triggered. I can't find a logical explanation for why the QAction is no longer triggered the 3rd time. Is there some loop protection built in DM that prevents me from using this logic?
Hi Michiel,
There should be no mechanism that would block your logic as a button is a write parameter and for those we trigger always even if the value is the same.
Are you always clicking the same row or clicking the button in each row?
Do you have any conditions or flows between the button and the QAction? (triggers, actions, ...)
Are you using SetParameterIndexByKey to set the button (write parameter) in the table? If that is the case then this is not supported to trigger a qaction with row=”true” on such action as SetParameterIndexByKey is intended for a read column in a table, not a write parameter. Best is to have a parameter in between that contains value format like “buttonvalue;rowkey” and have a QAction that processes this. The qaction that triggers on the button sets this parameter and the iteration QAction also sets this same parameter with the correct format as described above.
Thanks Laurens. It was working two times, but not the third time. I created now a buffer parmater instead and I’m going to move the logic to a QAction without row=true.
Thanks for your reply. I added a log line just before the ‘protocol.SetParameterIndexByKey([PID], [key], [Y], [Value]);’ and it is the same values that are used when doing this. When I trigger it manually (pushing the button) in the table it does work. I added a sleep of 1s just before the parameter set was done, but it did not change the behavior.