This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Set Value on a Boolean Property trying to set a default value for the workflow to work.

Hi,

I'm trying to do set a default value on a Boolean property in order for the workflow to transition to the correct state when the property isn't empty. Otherwise the workflow gets stuck waiting for a value to be set.

The approach I took was using a meta configuration rule as described in the documentation see:
4.9 Assigning Set Values for Properties
You can use the Set Value definition to add set values for properties that are filled automatically when a user creates a new object. For a description of the behavior of the Set Value definition, see Appendix A.
To add a set value for a property:
1. Click Add Rule to add a new rule. For instructions on how to get to the rules section in the configurations editor, see section 3.1.
2. Enter a suitable name for the rule in the Name field.
3. In the Filter section, enter a rule condition of your choice.
4. In the Behavior section, enter a configuration like one of the configurations shown below.
you want to add a set value for a property that already has a value, you need to force M-Files to overwrite the existing value by setting Force Set Value to Yes:
▷ Properties ▷ MY new property ▷ Property
▷ Set Value ▷ Mode
▷ Static value ▷ No
▷ Force Set Value = Yes

Using the static option and selecting No for my default value.

This works when first creating a new document within the meta card that is presented. However as soon as I save it the default value disappears and its empty again.
For existing documents in the vault it also show no default value set.

Does the set value (static) only work under certain circumstances?

Should I use a VBscript instead for the default, if so please send me an example script for a simple boolean property.

Much appreciated for any replies.

Thanks
Mark

Parents Reply Children
  • This suggestion will overwrite any user input that may have been present prior to the "gap step". You could work around it by making transition to the gap step conditional.
    However, I wonder why the first solution does not work? Property values should not disappear when saving an object. There must be something else present that kicks in at that point. Possibly an event handler, a calculated value script or a script action similar to the suggestion above.

    Mark, you should investigate if any such events is overruling your Metadata Card configuration.