M
Manifest•2w ago
ajpiano

Defaulting property values?

Is there a way of setting property defaults? I get exceptions when I do something as simple as try to setup a default value true/false for a boolean field. I have tried with both a default on the property as well as options: {default: true}. Apologies if I am missing something obvious here!
5 Replies
brunobuddy
brunobuddy•2w ago
Hello @ajpiano do you have the problem using the backend or the REST API ? Can you share your backend.yml (or the entity with that boolean prop) ?
ajpiano
ajpianoOP•2w ago
backend won't even compile with it, something as simple as this fails
ajpiano
ajpianoOP•2w ago
name: Report Schedule Schema
entities:
📅 Macro:
properties:
- { name: active, type: boolean, default: true }
name: Report Schedule Schema
entities:
📅 Macro:
properties:
- { name: active, type: boolean, default: true }
No description
brunobuddy
brunobuddy•6d ago
@ajpiano you cannot add the "default" property to it, this feature is not yet in Manifest but I am adding it to the backlog In the meantime I can suggest to invert the boolean as the default is always "fasle" on booleans, like replacing the "active" by the opposite: disabled, archived, etc...
ajpiano
ajpianoOP•6d ago
Yeah, I had a feeling it wasn't supported yet. Was more of a generic question as I would want to default most types of values
Want results from more Discord servers?
Add your server