Value of field not visible in list view

This time I can not see value of a field when viewing list.
I generate custom document identifier name with this code:
function generateIdentifier() {
var date = new Date();
fd.field('numerZlecenia').value = "PZ_" + date.getFullYear() + ("0" + (date.getMonth())).slice(-2)
+ ("0" + date.getDate()).slice(-2) +"_"+ ("0" + date.getHours() ).slice(-2)
+ ("0" + date.getMinutes()).slice(-2) + ("0" + date.getSeconds()).slice(-2);

Additionally I populate one of the user profile property to another field.

fd.field('userSAPNumber').value = props[i].Value;

In New, Edit Display I can see that these values are present.


But when viewing List these fields seems hav'ing no value:


Where did I make mistake?

Hello @Marcin,

Are you running the code on all forms: New, Edit and Display?

What are the types of these fields? Please share the screenshot of the field settings from the designer like so:


Yes, for the time being I run it on all forms.
Fields are of type "text".


Strange fact is that I can see both values when form is opened.

Hello @Marcin,

I suppose that you see values as you run the code on form load, thus fields are populated once the form is opened.

When you open and submit the form, are you getting any errors in the browser console(F12)? Please share the screenshot.

Are you running a custom code within the spBeforeSave event?

I do not run any code in spBeforeSave. Shall I? Some fields are saved some not.
On saver of the form console returns:

The only code is run from fd.rendered:

fd.spRendered(function() {
        fd.field('rodzaj').required = true;
        fd.field('rodzaj').$on('change', function(value){
                fd.field('Title').value = value;
        fd.control('organisation').$on('change', function(value){
            fd.field('selectedOrg').value = value.Title;



Please comment out all custom code and check if field values are saved.

If not, what content type do these fields belong to? Is it a default or custom content type?

oook. I have found out the issue. My fields were set to read-only...
Habits from InfoPath are so strong :smile:

Issue solved!

1 Like