How to access an attribute of a tabular section

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Oct 8, 2012
Company: Mal Ratu Indah

Salam!

I need to change a value of a tabular section attribute. For an attribute Type example for a first row of a tabular named Items.

How can I do that?

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

You can do it at client or at server

Code
&AtClient
Procedure changeValue1()
   line = Object.Items[0];
   line.Type = "new value";
EndProcedure

&AtServer
Procedure changeValue2()
   lObject = FormAttributeToValue("Object");
   line = lObject.Items[0];
   line.Type = "new value server";
   
   ValueToFormAttribute(lObject , "Object");
EndProcedure

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jul 18, 2012
Company: Osaka University

This works for me:

Code
&AtClient
Procedure SetType(Command)
   Object.Items[0].Type = "my type";
   SetTypeServer();
EndProcedure

&AtServer
Procedure SetTypeServer()
   Object.Items[1].Type = "his type";
EndProcedure

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

Thank you, friends!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks 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.