hello everyone,
I created a form action that allows me to insert records into a record list I created. I have modified some fields in the insert form so that they are automatically filled with automatically calculated values; I noticed that the moment I submit , the inserted record has the said fields empty, would you know how this can happen? I made sure that the data types entered are equal to the type declared in each field of the record list, so I am sure I did not accidentally enter a text type inside an integer :) . For more info I attach the error, and an example code of a modified field :
ERROR:
Problem: An error occurred in executing an Activity Class.
Details: Each item within the input "Records" must be a record data type. Received: LBOWI - RegistroFirme.
Recommended Action: Examine the activity class to correct the error and then resume.
Priority of this problem: High Priority
CODE:
a!localVariables( local!value : now(), a!dateTimeField( label: "Indipendence Sign Date", labelPosition: "ABOVE", value: local!value , saveInto: ri!record['recordType!{769add8e-6340-4224-9efb-1af6bf33b78b}LBOWI - RegistroFirme.fields.{2a30dfa1-b275-41c8-badd-3cdc7b52feec}indipendenceSignDate'], required: false, readOnly: true, disabled: false ) )
Discussion posts and replies are publicly visible
Setting default values does not work like this. The saveInto is only evaluated on a user interacting with that field. There are plenty of conversations about this topic. Search for "default" in the documentation
hi stefan thanks , in this case what is the best practice to do this type of work ?
Did you check the documentation? Another option I use frequently, is to add some a!save() to the submit button to populate certain fields.