LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-07-2018 20:07

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dglavastorm

    Hi, I've managed to program 2 nodes that enable or disable based on a parameter, but only when the parameter type is set to "boolean", or "string" and the input is either "true" or "false".

    I need this to be set to "Choice" instead of "boolean", and the selection to be numbers, in this case 50, 200, 300.
    The parameter name is "No. of Splits".

    For Boolean the code I'm using to enable the first node and disable the second when the parameter is set to "True" is :
    enable {{^No. of Splits=true^}}
    disable not({{^No. of Splits=true^}})
    This works perfectly.

    Any other string apart from "true and "false" or any numbers and nothing happens

    What is the correct code for using "Choice" using either numbers or strings ?

    Thanks,
    Dave


  • 2.  RE: Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-08-2018 12:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    If you could have this in the Enabled property:

    "{{^EnableParam=^}}" == "1"

    The node would only be enabled if the parameter called EnableParam was set to 1.


  • 3.  RE: Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-08-2018 15:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dglavastorm

    Thanks, that worked. How do I set a default though as its the first option that appears in the dropdown ?
    I can set the parameters in the "edit Choices" box, but there's no option I can find to set which is the default.

    Also does the "Mandatory" field effect anything ? I've never touched it so it's always on Default, but sometimes the text box says True and others say False and I can't work out what exactly it does or what dictates it's setting.


  • 4.  RE: Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-08-2018 18:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    1) You can't set a default value for a dropdown. It will always begin with "(default)". You could place the node into a library, and pick a value from the list, which will then become the default when you use the node from the library, but to my knowledge you can't pick a default value for the dropdown. If you want to enforce that some selection is always picked, you can set the Validator to "Not Blank"

    2) Mandatory comes into play when building a BRX or LXA. Any node tagged as Manditory MUST be executable (can be satisified)(must have data coming into it) or the compiler will throw an error and not build the BRX/LXA


  • 5.  RE: Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-08-2018 22:27

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dglavastorm

    ok, thanks again.


  • 6.  RE: Using Node Parameters to enable / disable nodes. Can only get Boolean to work

    Employee
    Posted 08-09-2018 06:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    I'm not sure if it's clear but also the = sign inside the parameter is giving it a value in the event that the parameter has not been set. The value below would be saying that if nobody set a value on EnableParam, then take it that the value is 1. You could do something like this so the node is enabled by default and somebody has to change the value of the parameter to disable it (or vice versa).

    "{{^EnableParam=1^}}" == "1"

    Also to point out since Stony mentioned about BRXs and LXAs - you can't enable and disable a parameter within a BRX by a run parameter. The node is either enabled or disabled when you compile the BRX/LXA.