Set User Selection Question

tmackin

Reputable Poster
I am reviewing R41610 and have a question regarding the format of the Set USer Selection code.

Set User Selection(BC Item Number - Short, <Not Equal To>, <Zero>, <And>)
Set User Selection(BC Tag Status, <Not Equal To>, "CL", <None>)
Set Selection Append Flag( <Yes>)
I would like to know what the parameter "None" means as far as the results of the data selection. I have always used "and" when trying to augment the existing data selection.

TIA
 
Hi Tim,

If this is the order of ER lines in the UBE, then it could be wrong.

<And>, <Or>, <None> allways concatenates the current selection with the previous one. Generally, you should use <None> in the first selection ER line, mainly if you do Not Append the selection.

If my memory serves me well, if you append your ER selection, then it will be in AND realtion with user selection and both will be bracketed:

(User Selection phrase) AND (ER Selection phrase)

This is the situation also, when you append selection, independently of, what operator do you use (and, or, none) in your first Selection ER line.

On the other hand, SetSelectionAppendFlag should be before all SetUserSelection ER lines.

Hope this help.

Regards,

Zoltán
 
Thanks Zoltan for you quick reply and explanation. This is exactly how the
code appears in R41610 out of the box. This is not the first time I have
seen the "SetSelectionAppendFlag" statement after the "SetUserSelection"
statements. I guess I will open a call with support to see what they have to
say. Thanks again
 
Zoltán,

My understanding of the "Set Selection Append Flag" is - that if you selected the parameter <Yes> then the program would take any "Set User Selection" commands in the Initialize event and then append any user entered (or default) data selection. If you selected the parameter <No> then the program would take any "Set User Selection" commands in the Initialize event and then THROW AWAY any user entered (or default) data selection. Since the user entered data selection isn't processed by the UBE engine until after the Initialize Section Event then the append command can happen anytime in the Initialize Section - first line to last.
*****By The Way that is why the set user selection and append commands are only available from inside the initialize event ******
I feel pretty confident that this is how it works, but I sure haven't tested it in the last ooohhh hundred years.

As for the Data Selection itself - there is an awesome description of how that works somewhere in the archives, and I thought we also asked to have it placed in the Tips and Tricks area. If I find time to search it out before others I will post it.

Ben again,
 
Hi Ben,

You are right about how does Append Flag work.

I suppose, you are right also, that it has not to be before the SetUserSelection statements.

I just checked the on-line help, and have not found limitation about where to place that call regarding SetUserSelection (except of course the InitSection), but found an other:

"This function will also need to be called before the call to SetUserSequence if the information to be added through that system function needs to be appended."

Maybe be this was, that I remembered.

Regards,

Zoltán
 
Re: RE: Set User Selection Question

Hi Tim,

I think, there is no need to open a call.

Please, check Ben's and my reply to Ben in this thread.

Regards,

Zoltán
 
Hi Tim and Ben,

Though you can place SetSelectionAppendFlag anywhere in the Init Section event, it have never come in my mind to place it after the SetUserSelection statements. I frequently used these statements and I placed always SetSelectionAppendFlag before the SetUserSelection statements. It is the logical (and readable) order for me (at least for me).

Regards,

Zoltán
 
Back
Top