This is either going to be a very stupid question or a very silly bug.
I want to check if MyUserParameter has a value, so I put a Creator and a Tester on my canvas checking whether MyUserParameter does have a value. It tells me it doesn’t, whilst it clearly does! Hmm, what’s going on?
Am I being dumb? Why can I not test a User Parameter?
I can get it by using a ParameterFetcher, so it’s not a big issue.
We recently upgraded from v2023.1 to 2024.1, and I thought this used to work, but I could well be mistaken.
EDIT: It does work if I check if MyUserParameter is of type string or when using RegEx. It sounds like the ‘has a value’ and ‘is null / missing / empty’ doesn’t work with user parameters.
Page 1 / 1
I am getting the same results as your EDIT note using 2021 version. I think the “Attribute has a value” operator (and the related ones) are meant to only work with attributes.
A possible work around for you, would be to add an AttributeCreator between the Creator and Tester. Creating a new attribute and giving it the value of the parameter. Then the Tester can test that new attribute instead of the parameter, and those operators will work.
Hi Liam
Thanks for checking. I got to the same conclusion, but it still caught me by surprise:
- why I never knew this before!
- why there doesn’t seem to be a simple way to check if a User Parameter has a value, i.e. that you must use an AttributeCreator / ParameterFetcher to get it, or - as I have now done - create a RegEx check: $(MyUserParameter) CONTAINS_REGEX \S