Setfieldproperties statement appears to fail

I have a text field, Test, containing this sort of data:

Screen Shot 2021-11-17 at 12.39.43 pm

With the field active, I run this procedure (both with and without the field name included):

setfieldproperties "Test",
    initializedictionary(
        "DIGITS","float",
        "FORMULA","zeroblank(Value)",
        "OUTPUTPATTERN","$#,.##"
        )

… but no properties are changed. Message statements fore and aft execute, which suggests that the setfieldproperties statement executes. What am I missing?

It worked for me if I changed “DIGITS” to “TYPE”. You might also want to set the “ALIGN” property to “Right”.

setfieldproperties "Test",
    initializedictionary(
        "TYPE","float",
        "ALIGN", "Right",
        "FORMULA","zeroblank(Value)",
        "OUTPUTPATTERN","$#,.##"
        )

That’s interesting. In order to make sure I used the correct syntax, I set the properties manually and then copied the blueprint - so much for that!

But thanks Dave.

Yes, but you only copied a small portion of the blueprint. Unfortunately, you did not include the TYPE key, which was critical to your application.

True - I saw “DIGITS”,“Float” and took that to be the specification.