@sanaz karamimoghaddam, I'm not actually sure what the limit treenode does in the tree. When you set the "Limit" field in the Partition Constraints tab of a Zone's properties, it does set the limitNode treenode, so you do want to reference that node in your OnReset trigger.
You can actually use the gettablenum() command just like the Sampler is showing you, because the partitionConstraints node is actually a table, where each row is a different partition constraint (they are usually added through Partition Constraints tab by clicking on the green plus sign button). So using the gettablenum() command would look something like this:
gettablenum(getvarnode(node("/Zone", current), "partitionConstraints"), 1, 3)
Where the "/Zone" string in the node() command is the name of your Zone resource. The 1 (the second parameter of gettablenum) is the rank of the Partition Constraint you want to affect (using a 1 gets the value you want from the first constraint, using a 2 gets the value of the second constraint, etc.). If you only have one partition constraint, just leave it as a 1.
You actually won't be able to use getvarnum() here, because the first parameter is an object that contains variables and the second parameter is the variable you want to get the value from. That object would be the Zone resource and the variable in this situation is the partitionConstraints node, which doesn't have the number data stored on it that you want because it is stored in subnode.