View Full Version : Runtime parameter
GuinnessDrinker
October 29th, 2009, 03:25 PM
Hello
Can anyone help?
Is it possible to display data from a table using runtime parameters of a date to display only that data which relates to the runtime date There is a date column in the data
In essence the same as running a filter to pick only data with the required date
Grant Perkins
October 29th, 2009, 03:54 PM
Hi GuinnessDrinker,
If I have understood your requirement correctly the answer is yes. Just set up a Calculated field for the Runtime Parameter (watch for 'Save between runs' and making it a required field) and then create a filter that uses the RT file for its value.
If you want to automate it I seem to recall that that is also catered for though I must confess it is not something I can recall trying out in anger in script.
HTH.
Grant
GuinnessDrinker
October 29th, 2009, 04:15 PM
Thanks for your quick reply Grant
Maybe I didn't explain very well or I don't know monarch as well as I thought I did
below is an example of the data
Date Amount
2009-01-10 1
2009-01-11 2
2009-01-11 2
2009-01-12 3
2009-01-12 3
2009-01-12 4
2009-01-12 5
2009-01-13 6
2009-01-14 7
2009-01-14 7
2009-01-14 7
2009-01-14 7
2009-01-14 7
What I want to do is somehow enter a runtime parameter to filter out all but the data that is for the required date
Does that make sense
Data Kruncher
October 29th, 2009, 04:17 PM
Don't get angry; just use the /set command line parameter to make it easy.
/set:FieldName=FieldValuewill do the trick.
Be sure to test and ue the CtoD function if necessary in your filter expression.
HTH,
Kruncher
Data Kruncher
October 29th, 2009, 04:23 PM
GuinnessDrinker,
Near simultaneous posts.
Build your runtime parameter (RTDate below) as a date field, and then your filter will be similar to:
RptDate=RTDate
GuinnessDrinker
October 29th, 2009, 04:41 PM
Thanks for your quick reply Kruncher but still not getting it
OllyInMunich
October 29th, 2009, 04:49 PM
Hello Guinness Drinker,
Assuming your data is in the table window, and that your fields are called "MyDate" and "Amount" - don't use "Date" as a field name in case you want to use Date functions. I'm assuming also that "MyDate" is a field of type Date.
Create a calculated field of type "runtime parameter", define the type as Date, call it "RunTimeDate". Create a filter called "MyFilter" with the expression:
MyDate=RunTimeDate
Save the model. Close it. Open it - and you should be prompted to enter a date. Monarch should then show the filtered data. Kruncher's tip will help when you want to automate the process.
HTH,
Olly
GuinnessDrinker
October 29th, 2009, 04:58 PM
Thanks Ollie
That worked a treat
Ian
Data Kruncher
October 29th, 2009, 05:07 PM
Nicely done Olly. Glad to here that you're on your way Ian.
Ian, you may find the following resources of interest: Monarch Batch File Generator (http://excelwithmonarch.com/tips/monarch-batch-file-generator), and Monarch's Runtime Parameters (http://excelwithmonarch.com/calcfield/monarchs-runtime-parameters).
GuinnessDrinker
October 29th, 2009, 05:17 PM
Thanks Kruncher will check them out
Your monarch with excel site is already in my favourites
Powered by vBulletin™ Version 4.1.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.