Passing ZIP codes between dashboard and MKR 1010

I want to pass 5 digit zip codes between a dashboard widget and mkr 1010.

How can I limit the number of digits to 5 and preserve any leading zeros?

Screen Shot 2024-05-15 at 7.15.16 PM
Screen Shot 2024-05-15 at 7.16.38 PM

Hi @meehollak.

There isn't any way to do that on the dashboard side of things, but you can check the length in the sketch code and then provide feedback to the user in some way if an inappropriate number of digits were provided.

Use the "Character String" Cloud Variable type instead of the "Integer Number" type.

Thank you!

You are welcome. I'm glad if I was able to be of assistance.