Hello, Marius Gidu!
Unfortunately, your structure is not supported. I can suggest you to change the way you keep your data. For this, use the single value tree and add subrows. I created an example for you:
| Code |
|---|
StocksTreeValue = FormAttributeToValue("StocksTree");
NewStock = StocksTreeValue.Rows.Add();
NewStock.Name = NStr("en = 'Stock'");
NewStock.TotalStock = 100;
NewLocation = NewStock.Rows.Add();
NewLocation.Name = NStr("en = 'Location'");
NewLocation.Stock = 18;
NewLocation.IsLocation = True;
NewStockInput = NewLocation.Rows.Add();
NewStockInput.Date = CurrentSessionDate();
NewStockInput.Quantity = 4;
NewStockInput.IsStockInput = True;
ValueToFormAttribute(StocksTreeValue, "StocksTree"); |