After submitting Form, New form show list control items of the last submitted form

Hello! I've a problem with list control:

I have a Form with a list control, after I saved a new form with all datas and I'm compiling a new one, the New form show the list control items I add to the last one.

If I click on refresh button in the list control, the items disappear.

both forms are correct but i think this isn't the aspected behavior.

The form is in a web part in a Sharepoint page (it happens even if in full.screen or panel mode), after clicking "save" button, I am automatically redirect to a new form (no code for this)

The form has a js script (lot of code) but I can't find errors in console

Perhaps, it takes too much time to update the items? if so, can I refresh list control automatically?


Hi @Fritz77,

Could you try using the approach from this thread to forcefully refresh the control? Let me know if this works for you.

do you mean to use fd.control('SPDataTable1').refresh(); in sp rendered of new form when opening? or before safe the last one?

I've just tried to put fd.control('SPDataTable1').refresh() at the beginning of sp.rendered and:

  • on the first time I open the form I get an error for every fd.control(listtname) I set;
  • the second one I don't get any error, probably because the form is in a web part and the form is already rendered (???) but the problem persist in every list I try to refresh.

It seems the the refresh command in js and the refresh button do something different

Hi @Fritz77,

This might happen because the control isn't loaded yet when you refresh it. Could you try putting fd.control('SPDataTable1').refresh() inside ready().then() like in the following example?
List or Library control — Plumsail SharePoint Forms Documentation

I add fd.control('SPDataTable1').refresh() in this way

fd.control('ListMoveVenduti').ready(function(dt) {
console.log('List or Library is initialized');
fd.control('ListMoveVenduti').refresh();

but the problem persist and I can't get the console log: I'm afraid that in web part the list control "remain in a ready state" or something similar.

Is there any difference between ready(function(dt) and ready().Then()?

OK, I solved the problem.

The form is in a Web-Part so, when you save a new item, the form isn't rendered again and ready() isn't triggered because it is always ready.

I had to put fd.control('SPDataTable1').refresh() in sp.saved() and then the lists work perfectly

1 Like