Sorry if this is a daft question but I just can't seem to get it working.
In my script I want to connect to a database table and get all the data for a specific day. I want the user to be able to set the date in the interface. So I have an input box in which I have put a variable called StartDate, but how can I get this into the load script?
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], DATTYP_ID, TRX_DAT, TRX_ID AS [Transaction ID] FROM data\TRANSACTION_DATES.qvd(qvd) Where ReportStartDate=$(rDate);
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.