Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Filter of companies by group

Forum

Search UsersRules
Filter of companies by group
#1
Interested
Points:: 0
Joined:: Nov 10, 2011

Hello!

I have a document, where only companies from certain group should be shown to a user.

For example in the catalog companies:
Group1:
Company_name
Group2:
Company_name

As you can see in both groups is "Company_name", identical. But I need this company only from the Group2.

Thank you in advance!
Regards,

Lioudmila

Profile
#2
Active user
Points:: 0
Joined:: Oct 4, 2018

Hello, Lioudmila!
Do you mean user restricted to sel ect company fr om only group specified to this document?
If so, then look at the "Choice parameters link" property of attribute. I can show you example.

If other - I need more details.

Profile
#3
Administrator
Points:: 0
Joined:: Oct 3, 2019

Hi Lioudmila!

You can make a selection not by company name, but, for example, by “Code”. The attribute  “Code” is usually unique in each Catalog, therefore, even if your company names are the same, you can still select and show the one you need at the moment.

There is an easy way to make such a selection without using programming at all.

To do this, you can use the "Choice parameters" property of the attribute on the selection form.

Please see the screenshots below, everything should be clear from them.

Profile
#4
Administrator
Points:: 0
Joined:: Oct 3, 2019

Continuation :-)

Akeksandr

Profile
#5
Interested
Points:: 0
Joined:: Nov 10, 2011

Hello Akeksandr,

thank you!
But it is not exactly what I mean.
If I filter with codes, we have only these products in the filter. But I need that a user inputs the names of products, and the product will be chosen only from the Group_2.
If for example a user inputs "Product 1" and there is a product with the same description "Product 1", only Product 1 from Group_2 will be able to select. If there is a product with the same description ("Product 1") in Group_1 it should not be shown in the list.
I hope I could explain.
Thank you in advance!

Regards,
Lioudmila

Profile
#6
Active user
Points:: 0
Joined:: Oct 4, 2018

So do you need my example with "Choice parameters link"?

Profile
#7
Administrator
Points:: 0
Joined:: Oct 3, 2019

Lioudmila,

the user in my example can select only the elements that we defined from only one group. He'll not even see elements from the second group ...

Please see the screenshots ...

Profile
#8
Interested
Points:: 0
Joined:: Nov 10, 2011

I understand how it works. But every time a user creates a new product I need to go into designer and add this new product.

Profile
#9
Interested
Points:: 0
Joined:: Nov 10, 2011

Hello Sergey, please give me your example.

Profile
#10
Active user
Points:: 0
Joined:: Oct 4, 2018

We have the Companies catalog, folder and item hierarchy.
In document TheDocument we have attribute CompanyGroup (CatalogRef.Companies), one tabular section with one attribute Company (CatalogRef.Companies too).
For CompanyGroup set the "select folders and items" property to "Folders"
For Company (TheTabular.Company) set the "select folders and items" property to "Items" and in "Choice parameters links" property select Name="Filter.Parent"; Attribute="CompanyGroup" (the value of "Edit mode..." doesn't matter in this case).
As result we'll get different choice lists of Company depending on selected CompanyGroup.

So you can restrict choice list by parent, owner and any other attribute value equality with any other.

Profile
#11
Interested
Points:: 0
Joined:: Nov 10, 2011

Thank you very much, Sergey! It works! That's great!

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.