More possibilities for if statements

Alina Peter's Avatar

Alina Peter

08 Apr, 2022 01:08 PM

Hi Chris,

I am facing the situation that I have to go through quite some related variants of tasks.
It would be great to be able to include include statements and python code also on the highest level based on an if, so I can set a variable at the top of the script that turns on and off later includes or scripts. This will make everything less error-prone and redundant.

I assume there’s a strong reason why this functionality is not already present?



  1. Support Staff 1 Posted by Christopher Sta... on 11 Apr, 2022 01:31 PM

    Christopher Stawarz's Avatar

    Hi Alina,

    This is something I want, too. The only reason it isn't already there is that I haven't gotten around to adding it. I still plan to do so, but I don't know when.


  2. 2 Posted by Alina Peter on 02 May, 2022 10:47 PM

    Alina Peter's Avatar

    Ok, please let me know when this is on the horizon, everything is a lot messier without it :blush:

  3. Christopher Stawarz closed this discussion on 01 Jun, 2022 01:00 PM.

  4. Christopher Stawarz re-opened this discussion on 15 Jun, 2022 04:00 PM

  5. Support Staff 3 Posted by Christopher Sta... on 15 Jun, 2022 04:00 PM

    Christopher Stawarz's Avatar

    Hi Alina,

    As of the current MWorks nightly build, MWEL supports conditional inclusion, which I believe provides a solution for this issue. The docs explain how it works in detail. If you have any questions, please let me know.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac