1b.app
Link copied -

Assign parent process by source variable

I set up such an action at the stage - shop_order_status_action_add_parent on the MVP version
By condition, I need to attach the process to the parent by source -
The variable {|$ordersource|} is used
Additional appeared. condition - bind to genus. top level source
On a project, a client can have 3 or more source levels -
We need a variable that will allow us to implement such logic: if there are 3 or more levels of sources, then check from the bottom to the next next (here is an example , if the top level is ) and look for the Parent by him. If only 2 levels, then look for how the variable works now.
Is it possible to implement such a variable? How many hours?
What are the alternative solutions?
Original question is available on version: ru

Answers:

If you have the opportunity to set up several such actions one after another, then you can modify the ordersource_parent1 ordersource_parent2 ordersource_parent3 variables so that you can set which source level you take for the current order. It will take 2 hours. The variables will give the name of the genus. source of the specified level for the source of the current order (or the name of the current source if it does not have a parent of the specified level).
21.12.2021, 15:06
Original comment available on version: ru


anonymous duck
OneBox production wrote:
If you have the opportunity to set up several such actions one after another, then you can modify the ordersource_parent1 ordersource_parent2 ordersource_parent3 variables so that you can set which source level you take for the current order. It will take 2 hours. The variables will give the name of the genus. source of the specified level for the source of the current order (or the name of the current source if it does not have a parent of the specified level).

In the right direction. But here is a moment with a condition. As I understand it, the variable will simply look at the desired parent level, which I will indicate to search for.
How can I make a condition so that if there are 3 levels or more (top 1), then watch the penultimate one?
And if there are only 2 of them, then do not check the level above, but search for the current one
If there is a check for such a condition, it should suit
21.12.2021, 15:41
Original comment available on version: ru

First you put the action with {|$ordersource|}
second with {|$ordersource_parent3|}
then {|$ordersource_parent2|}
then {|$ordersource_parent1|}
and that's it, in turn, it will take first the 3rd level, then the second, then the first and, as a result, will find it. Between the actions, you can still put the action "stop performing the doing actions" and there set "stop if there is a parent process" and that's it.
21.12.2021, 15:48
Original comment available on version: ru


anonymous duck
OneBox production wrote:
and there set "stop if there is a parent process" and that's it.

I looked, I didn’t find such a setting in action or a choice in the option to check the Parent field for filling or ... Please specify
As an option, after each such action, I can put a check that if the Parent field is filled in (or I will copy the additional field where), then Stop. But that's not much of a "crutch" option. Better for more accurate verification
21.12.2021, 16:03
Original comment available on version: ru

well then, before the action, copy the id type of the order in the additional field and check already in the additional field. Or we can make a setting in the action of assigning a parent so that it does not work if there is a parent, there are a million options. Make setting 1h
21.12.2021, 16:17
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