Pricing Blog

"output" displaying String, but the actual text layer displaying null

  • lululucaschae-1225901751945789533

    lululucaschae

    1 year ago

    I created a simple "substring" formula that takes in a String and returns a String.
    As you can see in the screenshot, the "output" node in the formula tree successfully displays "Wed" (shortened from "Wednesday").
    However, the text layer displays "null" instead of the output content.
    Is this a bug/KI?

    --
    Also I struggled for a few hours because I assumed the input would be a string, especially because I specify the input argument as "string" in the left panel. But I had to actaully convert the object into a string, which I thought was very confusing — was this intentional?
    1225901752113434714-Screenshot_2024-04-06_at_5.02.49_AM.png
    1225901752415555625-Screenshot_2024-04-06_at_5.04.22_AM.png
  • Tod-1225901756794540133

    Tod

    1 year ago

    Great energy @lululucaschae! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • lululucaschae-1225902070910157001

    lululucaschae

    1 year ago

    What it looks like without the dayReducer node.
    1225902070779875559-image.png
  • lucasg-1226035934089449533

    Lucas G

    1 year ago

    Is that what your formula looks like or do you only have one of those functions actually working (rest commented out)?
  • If all you want to do is truncate to 3 letters, then it'll probably be easier for you to use the built in nodes
  • lucasg-1226036665970331744

    Lucas G

    1 year ago

    1226036666024722514-image.png
  • Somethign like that
  • lululucaschae-1226074586190315520

    lululucaschae

    1 year ago

    Thank you! Yes I did comment out the rest 😦

    This was more of a “test” formula because I wanted to do so much more with custom formulas.

    But a lot of times it wasn’t working the way I intended. So I thought figuring this out would help me find the root cause of these issues!
  • 128651941143117824-@Lucas G
    lululucaschae-1226074721104171049

    lululucaschae

    1 year ago

    Thanks 🙂 for now I used dateformatter!
  • lululucaschae-1226157903417708615

    lululucaschae

    1 year ago

    @Lucas G it was a simple syntax error 🥲
    Needed to put curly braces around the parameters
    1226157903233155174-image.png
  • lucasg-1226170193018097746

    Lucas G

    1 year ago

    Best solution! Good stuff