Options

Query building questions

grouicgrouic Member Posts: 34
Hello,

I have to questions about queries :

- Is it possible to allow a user to run a query in RTC ? I can't add an Item in menusuite with type Query (I got an error when saving). Type Query is not allowed on page control actions neither.

- How to filter on a date in the dataItem filter ? If I put >=WORKDATE, the system replace WORKDATE with the hard value of today ...

Thx for the help,

Grouic

Answers

  • Options
    KishormKishorm Member Posts: 921
    No you can't do this directly, you would need to...

    1) Create a buffer table that you can use as a temporary table - this should have all the fields that are returned by your query

    2) Create a page to run the query and the show the results. The SourceTable property should be set to your buffer table and the SourceTableTemporary should be set to "yes"

    3) In the OnPageOpen Trigger you would have a variable for your query object, set the filter using SETFILTER on the appropriate field of your query object and then call the OPEN method and READ all entries and then insert records to the Rec variable (which is your temporary table)

    4) Add the page to your menusuite
Sign In or Register to comment.