Applicable Versions: All

 

Required values occur when conditions are created against the subject or query, that have been designated as Required Values in either the subject or query wizard. In normal operation, DataPA prompts the user for values to satisfy these required values in the query wizard at runtime. However, when embedding DataPA, you may often wish the application to set these required values ("Is it possible to prevent the run query wizard from prompting for required parameters when running a query from an application?").


If the required value is a date field, DataPA uses the Progress date function so there is no confusion if the date format on the server differs from the date format on the client. As such, when passing a date to the query's SetRequiredValue function, you should pass a string in the following format:


date(<Month>,<Day>,<Year>)


where <Month> = the numeric month, <day> = the numeric day and <year> = the numeric year. So for instance, if I wanted to set the required value on the sports2000.order.ordered field to Christmas day 2010, I would use the code,


Query.SetRequiredValue(""sports2000.order.ordered"", ""date(12,25,2010)"")