Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Select() method in Documents

Forum

Search UsersRules
Select() method in Documents
#1
Just came
Points:: 0
Joined:: Jan 14, 2013

Hi everyone!

I have the following code:

Code
Filter = New Structure;
Filter .Ins ert("condition", condition);
Documents.DocName.Select(,,Filter);


I received an error:
Invalid parameter val ue (parameter number '3')

Please help me about it.

Profile
#2
Just came
Points:: 0
Joined:: Oct 8, 2013

The best to use a queries. For example:

Code
Query = New Query;
   Query.Text = 
      "SELECT
      |   DocName.Ref
      |FROM
      |   Document.DocName AS DocName
      |WHERE
      |   DocName.RefKhoaLenh = &RefKhoaLenh";

   Query.SetParameter("RefKhoaLenh", RefKhoaLenh);

   QueryResult = Query.Execute();

   SelectionDetailRecords = QueryResult.Select();

   While SelectionDetailRecords.Next() Do
      // Insert selection processing SelectionDetailRecords
   EndDo;

Profile
#3
Just came
Points:: 0
Joined:: Jan 14, 2013

Thanks u. I know about it but I want to use another method to process. :D

Profile
#4
Just came
Points:: 0
Joined:: Oct 8, 2013

Ok. But it is wrong way. You can use only index attribute. See in Sintax Assintant:

<Filter> (optional)

Type: Structure.
Specifies a filter field and value of the opened selection. The structure key refers to a field name, while the structure value refers to the key filter value. As filter fields, you can only specify "Date" fields and document attributes with the indexing flag set to "Index" or "Index with additional ordering" in the Configuration Manager.
Important: A structure can contain only one element.
If the parameter is not specified filter is not used.

Profile
#5
Just came
Points:: 0
Joined:: Jan 14, 2013

I solved this method. :idea:
Thanks Oleg!

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.