[en] Edit field value doesn't override the initial variable value when printing labels from forms.

La traduzione ufficiale non è ancora disponibile.

[en] Problem

[en] Your label contains a variable that has the Initial value defined. The content of the Initial value is the data source, for example, the current date, another prompt variable, function, or database field.

55_initial1.png

[en] You print your label from a form where you can change The variable value in the Edit Field. When you open your form, the Edit Field already contains the initial value. Before printing, you manually change the Edit Field value, but your label prints with the Initial value instead.

[en] Solution

[en] If we want to keep the compatibility with solutions created in versions prior to 2017, NiceLabel can't avoid this behavior. But you can use a workaround instead:

  1. [en] Remove the Initial value content from your variable.

  2. [en] Open Form Properties > Events tab.

  3. [en] Click the Actions... button in the On Form Load section.

  4. [en] Add the action Set Variable for your variable and insert the data source value in the Value field.

    56_initial2.png

[en] When you open your form, your edit field will contain the data source value you defined in Form Properties. Your form will behave the same as if you used the Initial value. But when you change the edit field value, your label will print with the new value.