Posted: 3 Mar 2017 2:49 EST Last activity: 6 Mar 2017 4:06 EST
#Help - Activity doesnt work with my expectation
Using Activity method Obj-Browse to get the maximum value data,
then show it using Show Property method.
The max value data can be found although when continuing step to Obj-Save method,
the data is saved but when I re-run the activity again,
the max value isn't continuing the last max value from the latter.
Is there anyone can give me guidance what's is wrong or missing?
When you re-run the activity again, the Param.counter will reset to 1 again. I don't think it will start continuing/increasing the count from previously left out value.
Also, Can you explain, why in the ObjBrowse method, the MaxRecords Count is hardcoded to 1 ? In that case, it will always return 1 result, and there exists only one pxResults() entry . i.e there exists only pxResults(1), and later it loops through only this result.
I am not able to understand your exact requirement. But as far as I can understand, you are trying to fetch the maximum value of UserId field using Obj-Browse.Then based on the user id, you are trying to set some values on to your pyWorkPage. You are incrementing your counter parameter by 1 based on some when condition.
Now when you run the same activity again, your counter parameter will be again reset to 1 no matter what was it value in the last run. So, if you want to persist the same counter value which you got in the last run, save it on some clipboard property or some where in the data table on which you are browsing.
Please update the post with brief info so that we can get better understanding of the problem