Desktop version

Main > Forum > 1C:Enterprise Platform > Studying 1C:Enterprise platform > InformationRegister updating

Forum

Search UsersRules
InformationRegister updating
#1
Interested
Points:: 0
Joined:: Sep 30, 2020

Hello,

I want to update informationregister records.Is it possible?

For example,I have an information register below;

Car           gear
 Opel               manuel
 Seat               automatic

if car name is opel in the info register,change gear manuel to automatic.Is it possible and How?

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

Dear Mesut,

yes, of course it is possible.

For example, your register is called "Cars", it has Dimension "Car", and Resource is "Gear" (see screenshot).

In this case, the source code could be like this:

Code
&AtServer
Procedure Command1AtServer()
   
   RecordSet = InformationRegisters.Cars.CreateRecordSet();
   RecordSet.Filter.Car.Set("Opel");
   RecordSet.Read();
   
   If RecordSet.Count() Then 
      Record = RecordSet[0];
      Record.Gear = "automatic";
      RecordSet.Write();
   EndIf;
   
EndProcedure



Best,
Aleksandr

Profile
#3
Interested
Points:: 0
Joined:: Sep 30, 2020

Thank you very much!

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.