The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

Hello, everyone!

I have a document with Company, Counterparty and Agreement (some kinds of contract between that company and counterparty). When I click the choice button of Agreement field on the document form the Choice Form of Agreements catalog is opened, but it shows all items in this catalog.

What is the right way to apply filters by Company and Counterparty to the Agreements Choice Form list?

 
#2
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Nov 24, 2011
Company:

Fill controls event StartChoice. Set second parameter to false and OpenForm with filter parameters wich you can use in OnOpen event of ChoiceForm. Or you can make 3 Choiceforms for each case you need and open in StartChoice what you need

StartChoice(<data>, <second parameter>)

 
#3
People who like this: 0 Yes / 0 No
Active user
Rating: 3
Joined: Sep 16, 2011
Company: individual

You can use the Choice parameters property to set predefined static filters, and the Choice parameters links property to set predefined filters that depend on other field values.

Example:

You have a document with Company and Bank Account attributes. The Bank Accounts catalog has the Companies catalog as an owner. The Bank Account catalog includes the Active attribute of Boolean type. Fill the Choice parameters and Choice parameters links properties of the Bank Account attribute of the Payment document as follows:

In the Choice parameters links property, add a table row with the following values: Filter.Owner in the Name column, Company in the Attribute column, and Clear in the Edit mode of the linked value column (this is needed for clearing the Bank Account attribute when the Company is changed). This makes the list of Bank Accounts filtered by the Owner field equal to Company value.

In the Choice parameters property, add a table row with the following values: Filter.Active in the Name column, and boolean True in the Value column. This creates a filter that bypasses only active bank accounts.

 
#4
People who like this: 0 Yes / 0 No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

Great, Samuel! Thank you, that helped!

 
#5
People who like this: 0 Yes / 0 No
Active user
Rating: 5
Joined: Jun 4, 2013
Company:

how can I get to this Choice parameters property  ?

 
#6
People who like this: 0 Yes / 0 No
Active user
1C:Professional
Rating: 8
Joined: Jun 25, 2013
Company: 1C Company

You can find Choice parameters property among the object attribute properties (right-click the object attribute) or set special choice parameters property for a form item. Right-click the form field (Bank Account in our example) and then click Properties for it.

You can also manage choice parameters and choice parameter links using 1C:Enterprise script tools. See Syntax assistant for details.

1C Company support team
 
#7
People who like this: 0 Yes / 0 No
Active user
Rating: 5
Joined: Jun 4, 2013
Company:

Thanks a lot :)

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