3 Replies Latest reply: May 15, 2014 9:55 AM by Nigel Winton RSS

    Runtime Parameters

    ron cousino

      When doing database queries with Monarch Pro Version 8.1. I will usually apply a filter at the onset to limit a date range of data that I want to pull as well as one or two other criteria.  Is there a way to use Runtime parameters to simplify the use of the model information by another user for the next period.  Currently I have them save their current work as a project and then the next time they need to run it, open the project, go back and do a File, Database to get to the apply filter box and then change their date range or other criteria.  I tried building runtime parameters based on the documentation but apparently have missed something or misunderstood their use. I also don't want to open the entire dataset and filter in the table view.

        • Runtime Parameters
          Data Kruncher



          If I understand your needs properly, you want the user to supply a period or date, and retrieve data for that period only.


          This requires that you build a new calculated field (runtime parameter) - let's call it qryPeriod. This field will be of the same data type as the Period in your database.


          Now you need to create a filter with the formula:


          [font="courier"]Period = qryPeriod .And.

          <your other conditions here>[/font][/quote]and save the project with this filter active.


          This should get you want you want. Work for you?



          • Runtime Parameters
            ron cousino

            I must be still missing something.  I tried to set up a simple Database query to pull specific data.  I use a source filter which limits what I initially pull based on several criteria.  Example:  Clinic=0510 .and. Datepost>=20060101 .and. Datepost<=20060331 .and. SVtype=0.

              This then allows me to select specific fields from the sample I have pulled for my table.  I have created the parameter fields for the 4 items above in the table view and saved the model.  However how do I create an expression in the source filter using these runtime parameters since they are not in the database?


            I do not want to query the entire clinical database with millions of records and then filter after the fact.  Is this possible?

            • Runtime Parameters
              Nigel Winton


              With what you are trying to do RunTime parameters will only work after the full import. Your current method is the only way I have found in these situations. Although I hate to say it this is a case when Access or Excel might be more useful as you could set up some VBA to filter an ODBC connection as they open the spreadsheet. I use this quite successfully between Excel and Access. (I will now wash my mouth with soapy water)