Zum Hauptinhalt gehen

Suche

Suche

DB Setup Filtering current date between two dates in List

Kommentare

3 Kommentare

  • Avatar
    Peter Thane

    Try this for your filter setup:

    You can adjust the way the data format is displayed on your label via the Properties of the field and from the Type, as when you set this to Date the display options will appear. 

     

    Please not for your filter you can actually use different separators for the date and still the look up works, below I have used dd.mm.yyyy and dd/mm/yyyy and the results are shown below

    This is by raw data

    code,exp
    1111,11.05.24
    2222,01.01.25
    3333,22.9.23
    4444,9.9.26
    5555,22/9/24

     

     

    0
  • Avatar
    Christian Hauser

    Hi. Thank's for the answer.

    But this is not working for my request.
    I do not want to use a field entry popup shown above.

    We do have a Result list from which the users can choose a line.
    To filter this result list already before showing them to the user, I need to have a solution for using the current date as predefined Filter Argument (instead of the "?QueryPrompt1" in the Database Setup > Filter Window in the first picture. This should be a function or some kind of Variable I can use to check against the csv entry.

    Is there any kind of command to use like "now()" or "getDate()" or something else I can use in this Filter definition?

    Edit: The date in the csv list is a kind of "activation date" and an "end date" for a barcode validity check. If the date is lower than the activation date or higher than the "end date", the barcode is not shown to the user in the filtered select list for printing.

    0
  • Avatar
    Peter Thane

    Edit query prompt 1 in the filter to make it Read Only and Exclude Control from Tab Order, then click the More Options button and select VB script and in the VB box type Value = Now() and click Close, ignoring the error.

    On the Data Entry Form add an input linked to query prompt 1 but drag it off the side of the display screen so it wont be shown at print time (I have dragged mine to the bottom corner instead in the image below). I have also added a new record with a date set prior to 18/9/23 (ie today) to test

    and this gives me 

     

     

     

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.