Filter of companies by group

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Interested
Rating: 12
Joined: Nov 10, 2011
Company: 1A Software e.U

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

 
#2
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 4, 2018
Company:

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.

 
#3
People who like this:0Yes/1No
Administrator
Rating: 6
Joined: Oct 3, 2019
Company:

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.

Download 1.png (16.68 KB)
Download 2.png (96.2 KB)
Download 3.png (79.61 KB)
Download 4.png (72.5 KB)
Download 5.png (55.47 KB)
 
#4
People who like this:0Yes/1No
Administrator
Rating: 6
Joined: Oct 3, 2019
Company:

Continuation :-)

Akeksandr

Download 5.png (55.47 KB)
Download 6.png (73.95 KB)
Download 7.png (21.41 KB)
 
#5
People who like this:0Yes/0No
Interested
Rating: 12
Joined: Nov 10, 2011
Company: 1A Software e.U

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

 
#6
People who like this:1Yes/0No
Active user
Rating: 2
Joined: Oct 4, 2018
Company:

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

 
#7
People who like this:0Yes/1No
Administrator
Rating: 6
Joined: Oct 3, 2019
Company:

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 ...

Download 1.png (20.78 KB)
Download 2.png (15.85 KB)
 
#8
People who like this:0Yes/0No
Interested
Rating: 12
Joined: Nov 10, 2011
Company: 1A Software e.U

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.

 
#9
People who like this:0Yes/0No
Interested
Rating: 12
Joined: Nov 10, 2011
Company: 1A Software e.U

Hello Sergey, please give me your example.

 
#10
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Oct 4, 2018
Company:

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.

 
#11
People who like this:1Yes/0No
Interested
Rating: 12
Joined: Nov 10, 2011
Company: 1A Software e.U

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

 
Subscribe
Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.