Query About using the Set User Selection System Function for a particular condition

MumbaiBlues

Active Member
Hi all,
Actually I'm supposed 2 work on d Table F43121..I have a Condition where-in the MATC field is either equal 1 or 2 and within it i.e if we take the First condition i.e MATC=1 have an internal Condition where LAND=1 or blank...Similarly for MATC=2 also. and d Primary Crieteria is 2 work on Date Range ...So I tried out this piece of code...
Set User Selection(BC DATE-Recieved, <Greater than or equal to>, POFromDate, <none>)
Set User Selection(BC DATE-Recieved, <less than or equal to>, POT date, <and>)
Set User Selection(BC Match-Type,<equal to> 1,<and>>
Set User Selection(BC Code-Landed Cost,<equal to> 1<or>>
Set User Selection(BC Code-Landed Cost,<equal to> blank<or>>
Set User Selection(BC Match-Type,<equal to> 2,<and>>
Set User Selection(BC Code-Landed Cost,<equal to> 1<or>>
Set User Selection(BC Code-Landed Cost,<equal to> blank<or>>
But it doesnt Consider the date condition and rest of d code works fine...
Can I set the above condition in d same intialization section???
pls can somebdy guide me on this...
Thanks in advance...
 
Re: Query About using the Set User Selection System Function for a particular condition

Hi MumbaiBlues,

I am not sure, I understand your selection requirement exactly.
Would be great, if you describe its logical formula for us using parenthesis to show the required precedence.

You should know, that the logical operator (And, Or, None) in the SetUserSelection is always related to the previous SetUserSelection call, so in the first is always <None>.

<And> relation always takes precedence over <Or>.

You can always place a part of the selection to the Section Selection, sometimes it makes easier to compose the desired result. If this section is your main section and you do not want the ability, that the user can override this at run time, then this is not a chance.

If I understand your requirement well, then maybe the following ER code is appropriate for you:

Set User Selection(BC DATE-Recieved, <Greater than or equal to>, POFromDate, <none>)
Set User Selection(BC DATE-Recieved, <less than or equal to>, POT date, <and>)
Set User Selection(BC Match-Type,<equal to> 1,<and>>)
Set User Selection(BC Code-Landed Cost,<equal to> 1<and>>)
//
Set User Selection(BC DATE-Recieved, <Greater than or equal to>, POFromDate, <or>)
Set User Selection(BC DATE-Recieved, <less than or equal to>, POT date, <and>)
Set User Selection(BC Match-Type,<equal to> 1,<and>>)
Set User Selection(BC Code-Landed Cost,<equal to> blank <and>>)
//
Set User Selection(BC DATE-Recieved, <Greater than or equal to>, POFromDate, <or>)
Set User Selection(BC DATE-Recieved, <less than or equal to>, POT date, <and>)
Set User Selection(BC Match-Type,<equal to> 2,<and>>)
Set User Selection(BC Code-Landed Cost,<equal to> 1<and>>)
//
Set User Selection(BC DATE-Recieved, <Greater than or equal to>, POFromDate, <or>)
Set User Selection(BC DATE-Recieved, <less than or equal to>, POT date, <and>)
Set User Selection(BC Match-Type,<equal to> 2,<and>>)
Set User Selection(BC Code-Landed Cost,<equal to> blank <and>>)

Please, let us know, how does it work for you. Thanks.

Regards & Read you later

Zoltán
 
Re: Query About using the Set User Selection System Function for a particular condition

Zoltan's codes is exactly what I would do based on what you have describe as your desired result. You have to repeat your date selection for each occurance of your <or>. If you were using SQL without using jde to create you would only have to specify the date condition once; not the case with JDE's interface; it does not make it pretty and is why this can be a real issue if the user sees the data selection(not in your case). Very hard to explain to a user; I wish JDE would come up with a way that was more natural to SQL.- Angelis
 
Re: Query About using the Set User Selection System Function for a particular condition

Hi Zoltan and Angelis,
Thanks a lot will definately try out this code n let u know if tat worked at the earliest..
 
Re: Query About using the Set User Selection System Function for a particular condition

Hi Zoltan,
The Code which u had suggested really worked out.
The Data came out the way in which I wanted.
Thanks n Regards,
 
Back
Top