Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Afternoon All,
Simple question, hopefully my code will speak a thousand words here.
I am trying to do BELOW In my load script.
let minSellingGross = MIN([Selling Gross]) ;
Does anyone know why this isn't assigning the variable? I assume because the data hasn't been actually loaded it can't do it yet.
What is best practice whilst trying to hardcode a variable?
Many thanks,
James.
if Selling Gross is a field previously loaded in the script, you should use fieldvalue function to assign its min value to a variable
Seems the way I got it working was:
Testing:
load
MIN([Selling Gross]) AS MinSellingGross,
MAX([Selling Gross]) AS MaxSellingGross
Resident Main;
let vMinSellingGross = Peek('MinSellingGross');
let vMaxSellingGross = Peek('MaxSellingGross');