0

Need Validation Dates in a range

I need a script Validation  for field 'Documents'  that are not in the same fields Start and Finish data range.

Example

Doc # 1 20/Apr/2024.   30/Apr/2024

Doc # 2 20/Apr/2024.  26/Apr/2024  Validate not allowed

Doc # 2 24/Apr/2024 29/Apr/2024 validate not allowed

4 replies

null
    • Fred
    • 2 wk ago
    • Reported - view

    you mean something like:

    let t := this;
    let x : = select table1 where (t.startdate >= startdate and t.startdate <= enddate) or (t.enddate >= startdate and t.enddate <= enddate);
    if count(x) > 0 then true else false end;
    
      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 wk ago
      • Reported - view

       

      Hi Fred, Have a Problem, the idea is that some documents no have the same range of dates.

      If Doc 1 have 20/Apr/2024.   30/Apr/2024

      The Doc 2 or 3 or xxx do not have the same date range.

      • Fred
      • 2 wk ago
      • Reported - view

      i should find any records the startdate of the current record is between the any other startdate or enddate.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 wk ago
      • Reported - view

       

Content aside

  • 2 wk agoLast active
  • 4Replies
  • 22Views
  • 2 Following