Read-only field disappears when saving record

Description of data:
A decimal field ({amount}) belonging to a Grid View Form is formatted as ‘read only’ in its general configuration (Label Field), or in editing fields it is marked as ‘read only’ (both options have been checked, separately).

In Application-> Navigation, the option has not been set: do not open a new record.

Practical case:
We calculate the value of the field {amount} in the ajax onChange event of another field, for example change {amount} and we do: {amount} = {price} * {amount}.
Initially the field {amount} APPEARS (it is visible), but when we press the Save Button, it will show the new line of the next record, and the field {amount} DISAPPEARS (it is no longer visible).

If we continue to insert records in none, it shows the field or fields that are as ‘read only’ and have been calculated.

To check if the field or fields have actually been saved, we reload the form and see that they have indeed been saved in DB, and they become visible again. Even if we update the line and save, they also become visible.

Momentary solution:
To solve this, I had to use the macro sc_field_readonly ({amount}, ‘on’) in the onLoadRecord event, and deactivate ‘read only’ (label field) in its general configuration, or in edit fields uncheck the check ‘only reading’.

In this way, when you press the Save button, the field remains visible and it will show the new line of the next record.

Conclusion:
In versions prior to 9.6.005 this did not happen, we did not have to use the macro sc_field_readonly (), it was enough to mark the field as ‘read only’.

Latest version checked with stable operation regarding this problem, 9.5.001, currently in production on our WEB.

Thank you
From V5 Professional Edition - Oct 28, 2011
Up to V9 Professional Edition - Jan 28, 2022

1 Like

In the previous post, the value of the field disappears, not the field itself. The field is empty when you press save.

Sorry, does anyone read these things? …

We are in the BUG’s section!.

SC, it would suffice to say:
‘Hello, we are working on it, thank you for your collaboration, we will inform you of the follow-up and status of this problem.’

And if the problem is not well understood, please let us know.

Thank you
From V5 Professional Edition - Oct 28, 2011
Up to V9 Professional Edition - Jan 28, 2022

1 Like

The problem is in 9.6.
I have opened a ticket in support area and waiting for the solution.
In the meantime I have rolled back to version 9.5.003 which seems to have no such problem.

In addition also in 9.5.003

when you try to use a readonly field as parameter in sc_redir, the destination app reveive a null value.
Workaround: assign to a local variable before sc_redir and use this one in statement.
I am seriously considering going back to 9.4…