I
I
Ivan Melnikov2019-03-21 14:28:01
1C-Enterprise
Ivan Melnikov, 2019-03-21 14:28:01

How to fill an empty tabular section of a document with a loop?

There is an empty tabular part of the Serials document with the details Power and Protection Class .
It is necessary to write 5 rows in the tabular part.
It should be:
Power Protection
Class
10___________55 10___________55
10___________55
10___________55
10___________55
How to make it a cycle?
As far as I understand, here you need to use a loop

Для Сч = 1 по 5 Цикл
     //действия…
КонецЦикла;

What should be the body of the loop?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Nagibovich, 2019-03-21
@immelnikoff

Для Сч = 1 по 5 Цикл
   нов = Серийники.Добавить();
   нов.Мощность = 10;
   нов.КлассЗащиты = 55;
КонецЦикла;

A
Alexander, 2019-03-22
@Dem0lisher

I want to add lines = 5;
SoCalledMyTablePartInDocument = "MyTablePartInDocument";
For MF = 1 by I want to Add Lines Loop
new = PM.Add();
new.Power = 10; // or "10", depending on the attribute type;
new.ProtectionClass= 55; or "55", depending on the type of attribute;
EndCycle;
In general, yes, but it should work in the form of a document.
And we still don't know where you are trying to add rows from, maybe from external processing or from an event subscription..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question