string(2) "19"
Get the value of a list (activity) for Self-Hosted Bitrix24
08.15.2018 10:55:00
Articles
19
This solution allows to return a text equivalent of the infoblock list value.

Attention! This activity works only with Business Process Designer.

This solution is developed only for working with the list fields of infoblocks. Some custom fields, based on the field with type «List» (for example, field «Binded list (MCArt)»), instead of a text equivalent, returns its ID, which is not inconvenient for using in the business process.

To get a text equivalent you may use this tool.


It works this way:

— it takes the infoblock ID, ID of the list value and mnemonic code of the list field (If the mnemonic code is missing, it will not work);

— we get a text equivalent of the value.

Example of sharing use with the module "Dependent fields in lists".

Let's consider an example with a choice of marks of cars.

We’ve created a list “Dependent fields”.


Let's consider its fields.


The field "Name" is standard.

The field "Mark" — type “List”.

Includes three marks of cars for selection.


The field "Model" — type “Binded list (MCArt)” — created with the help of the solution “Dependent fields in lists”. Binded with the field "Mark".


For each value of the field "Mark" few values for the choice are available.



Now consider the scheme of the business process.



The business process has one variable of type String — "Model".


1 step. We get the text value of the field "Model" with the help of activity "Get the value of a list".


Infoblock ID — it’s an ID of our infoblock "Dependent fields".


List item ID — select the field "Model".


Property code — it’s a mnemonic code of the field "Model".


2 step. Write the resulting value to the variable "Model".


3 step. We send the standard notification to the user with the text "You have selected a mark" — and next the substitution from the field "Mark" + returned value, received by the activity (Model).




4 step. We check the condition — is this model "Pajero" or not.


5 step. Depending on whether the condition is fulfilled or not (Yes — Pajero, No — another model), the user will get a notification.

If Pajero — “Cool car”.

If not — “It is not Pajero”.


Now we will add a new element (not Pajero).


We receive the message — selected mark, model and text, specified in the “No” case of the business-process.


Now we will create a new element — Pajero.


We receive the message.


Installation

1. Download the solution on the Marketplace, specify the path to install.

2. In the administrative part of Bitrix, click Install Updates. In the next window, under the license agreement, tick two boxes and click Apply.

3. Then click Install.

4. After installation, the module doesn’t require any additional settings.

The solution «Dependent fields in lists» is installed by the same principle.


comments powered by Disqus