R
R
Run Utochkin2014-07-16 16:10:35
PHP
Run Utochkin, 2014-07-16 16:10:35

How to add a value to the multiple property of an element in Bitrix?

I use the following code - it deletes the previous data from the properties, inserts new ones, but it is necessary that the old ones be saved ... Well, you understand ...

$props['MESSAGES'][] = array("VALUE" => array ("TEXT" => $_POST['text'], "TYPE" => "text"));
$props['AUTHOR'][] = $USER->GetID();
$props['DATE'][] = date('d.m.Y H:i:s', time());
CIBlockElement::SetPropertyValuesEx($_POST['objavID'], 12, $props);

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Livach, 2014-07-24
@Mausglov

The most obvious option is to read the old data first (eg via CIBlockElement::GetProperty() ). As far as I remember, the Bitrixoids themselves do the same in the admin panel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question