The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Jan 14, 2013
Company:

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.

Edited: Dinh Hung - Jun 05, 2014 10:43 PM
 
#2
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Oct 8, 2013
Company:

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;

 
#3
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Jan 14, 2013
Company:

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

 
#4
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Oct 8, 2013
Company:

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.

 
#5
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Jan 14, 2013
Company:

I solved this method. :idea:
Thanks Oleg!

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