The 1C:Enterprise developers forum

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

I have a question !

I'm trying to write a script from a catalog and i want to get an information register dimensions and resources .... can someone give me a help please


and thanks in advance :)

Edited: mohammad maleh - Jun 27, 2013 07:53 AM
 
#2
People who like this: 0 Yes / 0 No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

try using

Code
NameOfRegister = "InformationRegister1";
Message("Dimensions:");
For each Dimension In Metadata.InformationRegisters[NameOfRegister].Dimensions do
   Message(Dimension.name);
EndDo;
Message("Resources:");
For each Resource In Metadata.InformationRegisters[NameOfRegister].Resources do
   Message(Resource.name);
EndDo;


Metadata used to access the configuration metadata structure

Edited: ivan avdonin - Jun 27, 2013 08:07 AM
 
#3
People who like this: 0 Yes / 0 No
Active user
Rating: 5
Joined: Jun 4, 2013
Company:

ohhh I'm sorry ... I explained wrong ... sorry sorry ... what i meant is to get the value of each record not the name of the dimensions and resources for example dimension1="tubes" resource1=100  ... hope you understand me

 
#4
People who like this: 0 Yes / 0 No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

i think its better using query for this

Code
Query = New Query;
Query.Text = "SEL ECT dimension1, resource1 FR OM InformationRegister.InformationRegister1";
Selection = Query.Execute().Choose();
While Selection.Next() Do
   dimension1 = Selection.dimension1;
   resource1  = Selection.resource1;
EndDo;


There is no object for Information Register.
Another collections used for operations with information register:
- InformationRegisterRecordSet
- InformationRegisterRecordManager
Link to information about adding a new record

Edited: ivan avdonin - Jun 27, 2013 09:44 AM
 
Subscribe
Users browsing this topic (guests: 2, registered: 0, hidden: 0)