M
M
Mag1str2021-12-21 19:03:36
1C
Mag1str, 2021-12-21 19:03:36

How to add a value in the tabular part 1s by code?

I have a Book Lease document, there is a tabular part, you need to put the CurrentDate() + 7 days into it in the attribute of the tabular part PlannedReturnDate.
Tried like this

&НаКлиенте
Процедура ДеталиКнигаПриИзменении(Элемент)
  
  Элементы.Детали.ПлановаяДатаВозврата = ТекущаяДата() + 7 * 86400;
  
КонецПроцедуры


61c1fac36b1b3756422503.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Kinash, 2021-12-21
@Mag1str

Try this:
Items.Details.CurrentData.PlannedReturnDate = CurrentDate() + 7 * 86400;

K
Konstantin, 2021-12-21
@fosihas

The tabular part is LINES!!!!
those. you need to decide which line it will be written to

K
kalapanga, 2021-12-21
@kalapanga

You are trying to assign a value not to what you need, and the wrong place has been chosen.
See, for example, here https://oficcer.ru/windows-7/zapolnyaem-tablichnuy... the section "How to programmatically fill in the details of a tabular section row"

K
Konstantin Nagibovich, 2021-12-21
@nki

You need to determine the current line and work with it already.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question