Dust Community Icon

Dust App Dataset Bug: String ID Reverts to Number Issue Explained

·
·

Hey 👋 - I wanted to share what (I think) is a bug when building a Dust App. ℹ️ Context:

  • I'm creating a Dataset where one of the field (here zendeskID) has to be a string.

  • I add my zendeskID, which is only made of numbers.

  • Dust force the property type to be a number and not a string. Even if I click String, when I try to edit the dataset again, it revert back to number

🤕 Why this is a problem for me

  • When I try to run the app, i got an error, telling me that my input is not a string.

🩹 How I manage to work around this issue

  • To solve the issue, I edit my dataset so it is a clear string, by adding some letter to it. That way the type selector stays on string and doesn't revert back to number.

  • Then from my app specification tab, I open the Edit modal and remove the attached letter. This allow me to save, and for some reason, it remains as a string that way. I can test my app properly now.

I'm no dev and have no technical background whatsoever, so it may be possible I'm also doing something wrong, in that case happy to learn !

  • Avatar of Daphné
    Daphné
    ·
    ·

    Hi Sébastien Hoareau! Does it work if you put ${INPUT.zendeskID.toString()} instead?

  • Avatar of Sébastien Hoareau
    Sébastien Hoareau
    ·
    ·

    No more error indeed 🙂 TIL 📖 Thanks Daph

  • Avatar of Daphné
    Daphné
    ·
    ·

    So that was because your field was indeed a number, and you needed to cast it to string to use as is in a url (that is a string)

  • Avatar of Daphné
    Daphné
    ·
    ·

    You're welcome 🙌🏻

  • Avatar of Alban
    Alban
    ·
    ·

    But indeed it's a UI issue that we force-convert to number when you selected string. Duly noted, thanks for raising!