Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Query language and DCS > Filter by recoder type

Forum

Search UsersRules
Filter by recoder type
#1
Just came
Points:: 0
Joined:: Sep 5, 2014

Hi everybody,
I use Information Registers to store many Documents type, when I want to get the oldest record information of only one Document type. Please help me use parameter type or another method to solve it.
Thanks

Profile
#2
Active user
Points:: 0
Joined:: Sep 26, 2012

You have dimension of Information Register with composite data type?
If so you can try use next condition at query

Code
WHERE NOT CAST(InformationRegister1.Document AS Document.Document1) IS NULL 

If value of dimension is not of type Document.Document1 then expression CAST(InformationRegister1.Document AS Document.Document1) return null

Profile
#3
Guest
Points::
Joined::

The correct condition here is REFS

Code
WHERE InformationRegister1.Object REFS Document.Document1

Or better use the virtual table parameters, if possible.

Profile
#4
Interested
Points:: 0
Joined:: Apr 5, 2012

Hi Dinh Hung,

In query try to use "Refs" function.

For example,

Code
Where InformationRegister1.Document Refs Document.ReceiptInvoice

Profile
#5
Just came
Points:: 0
Joined:: Sep 5, 2014

Thanks everybody so much!  :idea:

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.