I was filtering the end_tpid in the select expert as shown below:
{garage.garage_description} = {?Garage} and
{incident_log.incident_log_id} Mod 2 = 1 and
{incident_types.incident_name} = {?IncidentName} and
{incident_log.current_route_id} = {?CurrentRoute} and
{incident_log.incident_date_time} = {?IncidentDate} and
{@earlyLate} = {?cmta_rsaStatus} and
{trip_timepoint.tp_id} <> {trip.end_tpid}
However, now I am able to filter end_tpid with the formula below using then ""
I am not sure how the "" is filtering records in the formula below. Can someone shed a little light on this ""?
What is the then "" doing in the formula below? Is the "" suppressing records or filtering records?
Thanks for any assistance.
if ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 640 ) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 641) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 642 ) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 652) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 653) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 656 ) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 661) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 663) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 670) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 671) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 672) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 680) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 681)
then
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) < 0 then "Early" else
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) > 360 then "Late" else "OnTime"
else
if ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 640 ) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 641) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 642 ) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 652) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 653) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 656 ) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 661) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 663) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 670) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 671) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 672) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 680) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 681)
then
""
Else
if {trip_timepoint.tp_id} <> {trip.end_tpid}
then
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) < 0 then "Early" else
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) > 360 then "Late" else "OnTime"
else
{garage.garage_description} = {?Garage} and
{incident_log.incident_log_id} Mod 2 = 1 and
{incident_types.incident_name} = {?IncidentName} and
{incident_log.current_route_id} = {?CurrentRoute} and
{incident_log.incident_date_time} = {?IncidentDate} and
{@earlyLate} = {?cmta_rsaStatus} and
{trip_timepoint.tp_id} <> {trip.end_tpid}
However, now I am able to filter end_tpid with the formula below using then ""
I am not sure how the "" is filtering records in the formula below. Can someone shed a little light on this ""?
What is the then "" doing in the formula below? Is the "" suppressing records or filtering records?
Thanks for any assistance.
if ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 640 ) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 641) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 642 ) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 652) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 653) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 656 ) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 661) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 663) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 670) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 671) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 672) or ({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 680) or
({trip_timepoint.seq_num} = 1 and {incident_log.current_route_id} = 681)
then
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) < 0 then "Early" else
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) > 360 then "Late" else "OnTime"
else
if ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 640 ) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 641) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 642 ) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 652) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 653) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 656 ) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 661) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 663) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 670) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 671) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 672) or ({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 680) or
({trip_timepoint.seq_num} <> 1 and {incident_log.current_route_id} = 681)
then
""
Else
if {trip_timepoint.tp_id} <> {trip.end_tpid}
then
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) < 0 then "Early" else
If DateDiff ("s", {incident_log.sched_time},{incident_log.incident_date_time} ) > 360 then "Late" else "OnTime"
else