Skip to Content
avatar image
Former Member

using alias for parameters '[%2]'

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" ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 04, 2017 at 07:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 05, 2017 at 10:42 AM

    tnx

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2017 at 07:35 AM

    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

    Add comment
    10|10000 characters needed characters exceeded