Answer the question
In order to leave comments, you need to log in
Is there an "AND" operator in 1C?
It is necessary to find the nomenclature through a 1C request - so that the article and category of the nomenclature are the same as in the request. The "OR" operator is not suitable, but it is. What about the "and" operator? Nothing happens.
ВЫБРАТЬ
Номенклатура.КатегорияНоменклатуры КАК КатегорияНоменклатуры,
Номенклатура.Артикул КАК Артикул
ИЗ
Справочник.Номенклатура КАК Номенклатура
ГДЕ
Артикул = "2341612"
И
КатегорияНоменклатуры = "категория1"
Answer the question
In order to leave comments, you need to log in
The problem was in Nomenclature.CategoryNomenclature.NAME
ВЫБРАТЬ
Номенклатура.КатегорияНоменклатуры КАК КатегорияНоменклатуры,
Номенклатура.Артикул КАК Артикул
ИЗ
Справочник.Номенклатура КАК Номенклатура
ГДЕ
Номенклатура.Артикул = "23416"
И Номенклатура.КатегорияНоменклатуры.Наименование = "категория1"
With the operator And everything is fine. But "nothing happens" and "an empty query result is returned" are different things.
Most likely the CategoryNomenclature is not a string but a ReferenceReference. The easiest way is to pass it as a parameter: CategoryItems = &CategoryItems , Query.SetParameter() and that's it. In some cases, it is possible through two points: CategoryNomenclature.Description = "category1"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question