1b.app
Link copied -

Question about the action "Calculate and write a value to an additional field if the conditions are met"

Good afternoon! Please help, I spent a lot of time and did not figure out how to properly configure this action. I tried both with functions and the "PHP" checkbox and without - I still don't get the desired result (
Test order : https://psauto.crm-onebox.com/admin/customorder/order/40838/edit/#
Goal : Move text value from process product extra field (https://psauto.crm-onebox.com/admin/shop/orderproductfield/13/) to product extra field (https://psauto.crm-onebox.com/admin /shop/productfield/6/) , when a simple condition is met: "No values" (https://psauto.crm-onebox.com/admin/shop/workflowstatus/109/action/new/)
What we have:
What we get: (Must substitute the letter "E", but in fact only the variable [customorderproduct_yadb13] is displayed)
Thanks in advance for your time and help!
Original question is available on version: ru

Answers:

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Good afternoon.
Check the type of the field from which you take the value and the type of the field you write to, and also check for spaces in the formula, at the beginning or at the end (but this applies more to calculations)
27.04.2021, 18:03
Original comment available on version: ru

Thanks for the answer!
The field type is set to the same everywhere. We tried both with the "Text" value and with the "String" value, the result is the same - "[customorderproduct_yadb13]" is placed in the field.

There are no spaces in the formula.
28.04.2021, 09:35
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
And what is the value in the field "YADB"? how does the name of the cell get there?
28.04.2021, 10:18
Original comment available on version: ru

The value in the "JDB" field is obtained using the action "Automatically fill in the values of additional fields of process products based on the lookup" . The field type is the same everywhere. The problem is clearly somewhere in the settings of this additional field "JAB", tk. checked with other available base variables like [summ] - everything works. But why we do not work with the created additional field - I can not understand.
28.04.2021, 10:45
Original comment available on version: ru

The value in the "JDB" field is obtained using the action "Automatically fill in the values of additional fields of process products based on the lookup" . The field type is the same everywhere. The problem is clearly somewhere in the settings of this additional field "JAB", tk. checked with other available base variables like [summ] - everything works. But why we do not work with the created additional field - I can not understand.
28.04.2021, 10:45
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Change the field type to a string, 90 percent, which will work
28.04.2021, 10:47
Original comment available on version: ru

Checked. All interconnected fields, everywhere the field type is "String" . The result is the same, just the name of the variable is placed in the field [customorderproduct_yadb13]
I don’t even know which way to dig further.
28.04.2021, 11:29
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Hmm ... strange, but are there any checkboxes in the "Calculate and write ..." action?
28.04.2021, 11:35
Original comment available on version: ru

Here are the settings in the "Calculate and write..." action? Only one tick is worth it, but I tried to turn it off.
Just checked again, but only with "additional product field" [customproduct_idsayta2] . Everything works with him. But with none of the available "additional field to the products of the process" - does not want to work. Perhaps the problem is not with a specific field, but with the "Additional fields for process products" group in general?
28.04.2021, 12:07
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
No, the problem is with the text. It used to work like this, but now there are more and more problems.
There is an assumption that the problem lies in connection with the directory.
Try adding another field into which to copy the value from the "JDB" field and copy the value from it
28.04.2021, 12:27
Original comment available on version: ru

Created a new "additional field of the process product" - "Cell Name", added an intermediate action that copies the value from the "JDB" field to this new add. field "Cell Name", and after that already in the main field "Cell". With the help of such a "manipulation" it works, but for some reason only for the first line. for the second article, the action did not substitute a value. Why only for the first line - did not understand yet. .
It turns out that one cannot do without a "crutch" or refinement on one's own?
28.04.2021, 15:37
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Gleb Krylov wrote:
Why only for the first line - did not understand yet. .

check the box to execute for each product separately

Gleb Krylov wrote:
It turns out that one cannot do without a "crutch" or refinement on one's own?

you can make a revision, but this is already up to the programmer
28.04.2021, 15:40
Original comment available on version: ru

Thanks, I changed the settings, but the problem with the "Calculate and write ..." action jumped to the added "crutch" action "Copy process product fields" . Does not want to fill in the "Cell" field in any way, except for the first line .
I understand that I’m already tired, but as you can see, I have a fairly simple task, but I can’t achieve the desired result (Thank you for your patience and help.
28.04.2021, 17:31
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Did you rename the Default Cell field to Cell Name?
The value of the field that you have written there is not visible. I do not have access to your system, so please give all possible screenshots.
29.04.2021, 11:21
Original comment available on version: ru

Yes, I have renamed this field. I tested it over the weekend, it seems that the matter is really with the directories. I created new ones, filled in fields with simple values, with special characters, and then tried to get them in the additional field of the process product, and from it further into the additional field of the product. Everywhere a similar outcome - none of the available actions or automations - failed to do this. I think only modification will help. Well, maybe there is some other way, but I haven't found it yet.
04.05.2021, 10:23
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
The action must copy the value, whatever it is, but it's a cell, it must be an exact match. If you copy from the directory to a cell, then nothing may work.
You can give me access to the create.decision@gmail.com mail, I will look at the settings myself
04.05.2021, 11:21
Original comment available on version: ru

Thank you for providing access.
Test order : https://psauto.crm-onebox.com/admin/customorder/order/40838/edit/
BP settings: https://psauto.crm-onebox.com/admin/shop/workflowstatus/109/action/new/
Cell tree (standard): https://psauto.crm-onebox.com/admin/cell/manage/23/
Cell Directory : https://psauto.crm-onebox.com/admin/shop/custom/object/directory/4/
Brands-Cell Directory : https://psauto.crm-onebox.com/admin/shop/custom/object/directory/3/
Initial BP logic: based on the "correct answer" from this topic: https://crm-onebox.com/en/support/stock/2795-zapolnit-yacheyki-po-umolchaniyu-dl... . But we added an intermediate condition - "if the additional field of the product "Default cell" is not filled, then it must be filled with a value from another additional field of the" JDB "process, which in turn receives data from the directory". In the current linking of BP actions, one more step "Copy fields ...." has been added, as you advised earlier (so that the data in the program field "Cell" (cell) gets data not from the additional field of the product, but from the additional field of the product of the process)
05.05.2021, 09:43
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
The problem manifests itself when writing in a field that is associated with a directory.
Therefore, I made a field (string) and write the value from the JDB field into it, and then copy it to the default cell
In the end, everything worked
05.05.2021, 12:53
Original comment available on version: ru


Sukhanitsky Andrey
Integrator Premium Partner
Integrator CRM wrote:
The problem manifests itself when writing in a field that is associated with a directory.
Therefore, I made a field (string) and write the value from the JDB field into it, and then copy it to the default cell
In the end, everything worked

Thank you very much for your help, sorry if I messed up, everything works now. It was necessary to immediately give you access)) I close the task, I mark the correct answer! Thank you for your time and attention to our problem.
05.05.2021, 14:34
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment