Filtering the locations for each company in the same databas

rajalakshmi223rajalakshmi223 Member Posts: 8
edited 2013-01-22 in NAV Three Tier
hi
i have a issue to filter the locations in each company using SETFILTER but
it throws an error:
A maximum of 12 parameters must be used when calling the function. For example:

MyFunc( .. , .. , .. )
ROUND(MyVar)
ROUND(MyVar,0.05)
totally there are 26 locations to be hardcoded in the same setfilter function.
the report is common to every company in the DB.If i run the report in any company it should filter the locations company.
Kindly help me ](*,) :shock: :?:

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Show us your SETFILTER-statement so we can correct your code
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • manikandanmanikandan Member Posts: 160
    Hi rajalakshmi223,
    Welcome to mibuso. =D>
    you just create one Boolean Variable in Location Table and set value for this Boolean field based on condition.After that use SETFILTER.kindly avoid hardcoded .

    Regards,
    Muthusubramanian.M
  • ppavukppavuk Member Posts: 334
    LOL, I think code is something like:
    rec.setfilter("Location code", '%1|%2|%3|%4|%5|%6|%7|%8|%9|%10|%11|%12|%13|%14|%15|%16|%17|%18|%19|%20|%21|%22|%23', 'A','B','C','D','E','F','G','H','Z','Z','z','z','z','z','z','z','z','z','z','z','z','z','z');)
    
    

    This will definitely throw error :) LOL

    Edited: Yep, reproduced. Can't believe that people making this code :)
Sign In or Register to comment.