Try to use a list:

FREETIER1_NAVLIST=[STYLESHEETNAVID,SMARTLINKSNAVID,DOWNLOADVCARDNAVID,
QRCODENAVID,HEADLINENAVID]


navlist=None  # no change
    if interfaceCategoryID==FREETIER1ID:
    navlist=FREETIER1_NAVLIST
....


What is the type of row.navID?
Is it a list? Use:

if row.navID:
    navlist=navlist + row.navID
    navs=db(db.nav.id.belongs(navlist)).select(orderby=db.nav.id)


If row.navID is an integer:

if row.navID:
    navlist=navlist + [row.navID]  # or navlist.append(row.navID)
    navs=db(db.nav.id.belongs(navlist)).select(orderby=db.nav.id)


Or something else? Please write again..

Now

navlist.append(UPDATEACCOUNTNAVID)

should work.

Regards, Martin


2014/1/25 Annet <[email protected]>

> In a module I have the following constant:
>
>
> FREETIER1_NAVLIST=STYLESHEETNAVID,SMARTLINKSNAVID,DOWNLOADVCARDNAVID,QRCODENAVID,HEADLINENAVID
>
> where ...NAVID is an int, like STYLESHEETNAVID=29
>
>
> In a function I have:
>
> navlist=None
>     if interfaceCategoryID==FREETIER1ID:
>     navlist=FREETIER1_NAVLIST
> ....
> if row.navID:
>     navlist=navlist + tuple(row.navID)
>     navs=db(db.nav.id.belongs(navlist)).select(orderby=db.nav.id)
>
>
> This works, however, I want to add a singel NAVID to navlist:
> UPDATEACCOUNTNAVID
> I tried navlist.append(UPDATEACCOUNTNAVID) but that doesn't work.
> What's the correct syntax to add an item to navlist.
>
>
> Kind regards,
>
> Annet
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to