Data360 Analyze

 View Only
  • 1.  Blank property possible?

    Posted 08-05-2020 12:05

    I would like to have a property that, if left blank.. gets a default value. Im thinking it wont work.

    in a python node 

    FLD="DEFAULT"

    FN="{{^FolderName^}}"
    if FN is not None:
         FLD=FN

     

    it breaks at setting FN="{{^FolderName^}}"

    No value was able to be evaluated... Any way around this?

    It not horrible if I cant, just a convenience..



  • 2.  RE: Blank property possible?

    Employee
    Posted 08-05-2020 12:28

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

    If you put an = after the parameter name but still inside the brackets it will take that value as the default when the parameter has not been given any value.

    e.g.

    FN="{{^FolderName=MyDefaultValue^}}"



  • 3.  RE: Blank property possible?

    Posted 08-05-2020 12:34

    AWESOME! SO I dont even need the IF

     

    FN="{{^FolderName="+FLD+"^}}"

     

    is perfect!



  • 4.  RE: Blank property possible?

    Employee
    Posted 08-06-2020 06:26

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

    A couple of things. I noticed yesterday you had an extra ^ in the parameter value (3 rather than 2). I think with 3 it will only take the default value so make sure it is like this (no quotes also):

    {{^FolderName=+FLD+^}}

    Another thing I have noticed if you enter a parameter value you seem to have to hit Enter on your keyboard to make it stick. If in doubt refresh the browser page too. I'm going to test my theory on having to hit enter and raise as a potential bug if it seems appropriate. Have a look at the screenshots attached.

     

    Attached files

    Parameter_Value.png
    Parameter_Output.png
    Parameter_Default.png

     



  • 5.  RE: Blank property possible?

    Posted 08-06-2020 06:29

    Sorry Gerry! I just noticed my mistake, deleted that post lol  (yes I did catch the other ^ too)

    I was setting FN, but the code following was using FLD so it was never picking up the FN value :) lol

    soooo ignore me.. I need more coffee!

     

    THANK YOU!