Skip to Content
author's profile photo Former Member
Former Member

CRW - Select Expert not providing the desired results

The following select Expert formula is giving me inconsistent results:

if {?SortName} <> '' then {HRRM.SortName} = {?SortName} else 1=1 and

if {?Employee} <> 0 then {HRRM.HRRef} = {?Employee} else 1=1 and

if {?Craft} <> '' then {HRRM.StdCraft} = {?Craft} else 1=1 and

if {?IncludeInactive?} = "N" then {HRRM.ActiveYN} = "Y" Else 1=1 and

{HRRM.StdClass} in {?BegClass} to {?EndClass} and

{HRRM.udDateLastCheck} in {?BegDate} to {?EndDate} and

{HRRM.HRCo} = {?HRCo}

Depending on the sequence that these statements are in seems to determine how the CRW selects the data. All formulas work by them self but donu2019t provide the desired results when but together.

Is there an order which these statements should be in? If I move them around I get different results.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2009 at 04:20 PM

    Hi William

    Can you try modifying the formula as given below:

    if {?SortName}="" then {HRRM.SortName} = {?SortName} else 1=1 and

    if {?Employee} =0 then {HRRM.HRRef} = {?Employee} else 1=1 and

    if {?Craft}="" then {HRRM.StdCraft} = {?Craft} else 1=1 and

    if {?IncludeInactive?} = "N" then {HRRM.ActiveYN} = "Y" Else 1=1 and

    {HRRM.StdClass} in {?BegClass} to {?EndClass} and

    {HRRM.udDateLastCheck} in {?BegDate} to {?EndDate} and

    {HRRM.HRCo} = {?HRCo}

    Thanks

    Pradeep Hulke

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      The actual statement is as follows:

      if {?SortName} <> "" then {HRRM.SortName} = {?SortName} else 1=1 and

      if {?Employee} <>0 then {HRRM.HRRef} = {?Employee} else 1=1 and

      if {?Craft}<>"" then {HRRM.StdCraft} = {?Craft} else 1=1 and

      if {?IncludeInactive?} <>"N" then {HRRM.ActiveYN} = "Y" Else 1=1 and

      {HRRM.StdClass} in {?BegClass} to {?EndClass} and

      {HRRM.udDateLastCheck} in {?BegDate} to {?EndDate} and

      {HRRM.HRCo} = {?HRCo}

      It's displaying all records regardless of company?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.