I have a similar problem in which i require input from a user (to add a date) this date is then used for the script reload.
I got the the input box to work but i get following error:
Field not found - <ReportStartDate>
My script is below
let rDate=Input('Enter Report Date (format DD/MM/YYYY', 'Input box');
LOAD [Sort Date],
ReportStartDate - [Sort Date] as [Days Outstanding],
TRX_ID AS [Transaction ID]
Any help would be great.
Is ReportStartDate a field in your qvd file? Because the error message you are getting would suggest to me that it is not. If it is not a field then you might want to try using $(rDate) in its place directly. Or, alternately, set ReportStartDate = $(rDate) ealier in the script.
Either way, you may also need to look at inter record functions to see if you can do the calculation
ReportStartDate - [Sort Date]
as part of the script. I don't know much about inter record functions but search the help files and you might find something useful.
Hope that helps,