+1
*There's no need for an extension to have a supervisor, because the
supervisor is already stored in Person. !!!*

2015-09-17 11:10 GMT+01:00 Carla Raquel <carlaaaraq...@gmail.com>:

> *So what? You should future proof the app. Some day there might be
> extensions in India or something.*
>
> Actually, the extensions are internal to the company, either phone numbers
> or mobile numbers, so your scenario won't ever apply.
>
> *Do you mean the extensions of the persons he supervises?*
>
> That is what he already does, which is what I don't want it to do. I'll
> give an example,so that you can visualize it better:
>
> Supervisor X has two extensions: 5589,5590
> Supervisor X supervises two people: A and B
> A has two extensions: 4572,4573
> B has one extension: 4321
>
> My current query returns: 5589,5590,4572,4573,4321
> What I want it to returns: 5589,5590
>
> Conclusion: Just the Supervisor extensions
>
>
> quarta-feira, 16 de Setembro de 2015 às 18:15:53 UTC+1, Leonel Câmara
> escreveu:
>>
>> > I think in this case they won't be strings since I read the numbers
>> from a XML and they don't have the '+' character
>>
>> So what? You should future proof the app. Some day there might be
>> extensions in India or something.
>>
>> > Not all the supervisors.I want to get the extensions of a particular
>> supervisor
>>
>> Do you mean the extensions of the persons he supervises? If so:
>>
>> the_supervised = db(db.auth_user.Supervisor ==
>> ParticularSupervisor.id)._select(db.auth_user.id)
>> extensions_of_the_supervised =
>> db(db.Extension.Person.belongs(the_supervised)).select()
>>
>> This will give you the extensions of everyone that is supervised by this
>> person.
>>
>>
>> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to