Skip to Content
0

using alias for parameters '[%2]'

Dec 02, 2017 at 11:31 AM

42

avatar image
Former Member

I have the following demo query:

/* select * from ocrd t1 */ declare @card varchar(10) set @card = /* t1.cardCode */ '[%0]'; select * from ocrd t0 where t0.CardCode = @card

SBO opens the Query - Selection criteria with default attribute name "BP"

is there a way to assign alias to the default attribute ; "Customer Code" instead of "BP" ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Johan Hakkesteegt Dec 04, 2017 at 07:22 AM
0

Hi,

The alias shown is determined by the B1 client, based on the field you choose here: /* t1.cardCode */

You can try to influence this by choosing another field. Please note that for the parameter mechanism to work, all you need is for the source field (/* t1.cardCode */) to be of the same data type. It dose not even have to be the same table.

Regards,

Johan

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 05, 2017 at 10:42 AM
0

tnx

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 07, 2017 at 07:35 AM
0

Hi,

I have few more questions concerning parameters in SBO.

a. How to pass a parameter that is not associated with any table field like choose Y/N .?

b. I have few parameters to pass each from different table and field how is it done?

c. I have the following part of query : /* select * from ocrd t0 */

declare @cardCode varchar(5)

set @cardCode = /* t1.cardCode */ '[%2]'

select t0.cardName etc.

from ocrd t0

where (t0.cardCode = @cardCode OR @cardCode = '')

when I do not choose any value the query does not returns any data .

d . I devekop my queries in SSMS and then copy it to query generator in SBO.

when I excute the query what to see cardCode and cardName actully i can choose only CardCode

thanx

Share
10 |10000 characters needed characters left characters exceeded