I searched for this a lot now and I also found a few threads that all show me the same method (like this one):
When using the described method, I get a value but it is not the highest in my dataset.
For more explanation:
I have a field called ExpNr which contains only numerical values (at the moment from 1 to 9) so I expect the value 9 for my script:
Load Max(ExpNr) as MaxExpNr resident Experiment_Info;
Let vExpMax = FieldValue('MaxExpNr', 1);
But instead of 9, I get the value 3.
I hope someone can help me with my problem
Solved! Go to Solution.
Actually, it makes a difference. I tried Peek() the second you mentioned it, and it works ...
Sometimes I don't understand this program at all.
Thank you Sunny!
For this sample, I get the same values
LOAD * Inline [
LOAD Max(Field) as MaxField
LET vMax1 = FieldValue('MaxField', 1);
LET vMax2 = Peek('MaxField');
TRACE FieldValue $(vMax1);
TRACE Peek $(vMax2);
Do you happen to have MaxExpNr created elsewhere in the script as well?
no, I do not use it somewhere else.
I can not provide sample data due to security issues.
But your example is probably exactly the same data setup (the difference would be that the values in ExpNr happen to appear multiple times. The data looks somewhat like this