Replace a parameter value based on a character from another parameter

Hello,

This is my second script and I am trying something super simple. It’s working but I still get following error.

I want to replace a parameter valuse based on a character from another parameter.
In this case i have the sheet number in which first 3 charachter describe another parameter.
Exemple: A0100-

A- architecture coresponds with ARH from discipline paramater, 0 - site survey phase - corresponds with “RLV” phase, 1- plan view. corresponds with “PL” type of drawings parameter.

Beside the error, I was looking for a way to simplify the script. I think its quite esay, but I feel like I did it the roundabout way.

Thanks!

Hi @eugeniu.sainsus if it is false should it be “ret” ? if so try “ret” in the codeblock

If it’s false it shouldnt be affected, it should remain the way it it before I run the script.

Hi @eugeniu.sainsus do you mean as here ?

Hi,

Yes, I will try to see if it works for me. Thx

I tried it and I think its working a bit differently than I intended. If its false it takes the value from the original list, but I need that in case of “false” to not copy anything to the “Expert tehnic” parameter.

I tried with List.Empty and its working. No error.

Can improve somehow the workflow? Maybe change some nodes to codeblocks?