Hello,

It depends on the SQL Table you are considering.

Some SQL Table have a column Y/N indicating that the record is active or not. In addition to a DateFrom and DateTo.

if the component has a checkbox "active" the SQL can be

Select * from SQLUser.SQL_Table where ActiveColumn = 'Y' and (DateFrom <= CURRENT_DATE or DateFrom is null) and (DateTo >=CURRENT_DATE or DateTo is null)

But it depends on the Table you are considering.

Please can you detail your needs?

Regards,

Jacques

Hello Wanbo Wang,

This error means that you have some element modified in TrakCare as Site level (or deleted), but the Questionnaire is Region Level. To solve this issue, you should check in TrakCare what GUID is missing:

Tools >> Change Control >> Find GUID

 

Check which component should have been saved as Region level or has been removed.

Once you have it saves as Region Level you will be able to commit to P4.


I checked in Perforce and it seems the component was deleted on 6 november 2020 with JIRA TC-260035 but recreated on 1st august 2021 with JIRA TC-301371.

 

 

 

So your problem should have been solved.

Regards,

Jacques

Hello,

You have to navigate through subscript using $order.
Assuming your first node is "under2" and won't change, and assuming your date is "DD-MM-YYYY"

you can do:

ClassMethod TestGlobalAccess()
{
   set ^checker("under2", "Eric David", "02-05-2018") = ""
   set ^checker("under2", "Eric2 David2", "02-07-2016") = ""
   set ^checker("under2", "Name1 Name2", "07-06-2018") = ""
   set Name = ""
   for {
        set Name = $order(^checker("under2", Name))
        quit:Name=""
        set DateBirth = ""
        for {
             set DateBirth = $order(^checker("under2",Name,DateBirth))
             quit:DateBirth=""
             set CacheDateBirth = $zdateh(DateBirth,15)
             if ((+$h-CacheDateBirth)>730) {
                  write $$$FormatText("%1 with Birthdate=%2 is older than 2 years",Name,DateBirth), !
             }
        }
    }
}

I hope this help.

for date conversion I decided to convert the birthdate into Cache Date, instead of converting $horolog into "DD-MM-YYYY" format.
But your method work also.

If you have only one record you can do:

ClassMethod Test()
{
   set ^checker("under2", "Eric David", "02-05-2018") = ""
   set Name = $order(^checker("under2", ""))
   quit:Name=""
   set DateBirth = $order(^checker("under2",Name,""))
   quit:DateBirth=""
   set CacheDateBirth = $zdateh(DateBirth,15)
   if ((+$h-CacheDateBirth)>730) {
      write $$$FormatText("%1 with Birthdate=%2 is older than 2 years",Name,DateBirth), !
   }
}

I hope this help.

Cheers,

Jacques