How to update DataView from JS

i have a custom jquery function to set the value of a search field.
however when i set the value with code the DataView do not update. i have to click on the field manually

There has to be a trigger to set off an event. This trigger can be in the form of a page load, a mouse-up or a change in value.

What triggers your custom jQuery function?

my function is a QR scanner
after the successful scan i set the search field value to the scanned result then i tried to use jquery focus() and blur() in the search field to force the update but no luck

I think that a change-in-value trigger will serve the purpose.

you mean from wappler dynamic events?
there is no option to force filter on the DataView

Static Events -> Data -> Change

But from static event you have to type the command.
What should i put there to update the DataView?

But from static event you have to type the command.

What should i put there to update the DataView?

The way that I see this working is that scanning the Barcode populates the Search field which in turn activates the on-change event. This change acts as the trigger to apply the search function.

1 Like

Yes but the strange thing is that the search field change but thr DataView do not auto filter automatically.

Have a look at this to get some ideas.

Ok thank you @ben for your help :blush:

When changing the input value programmatic or with jquery you need to fire the input change event to let App Connect know about the change. You can do this with jquery.change

https://api.jquery.com/change/

1 Like

@George i tried this
$( "#search" ).change();
but it still didn’t update the DataView. is there a function to call in the change?

Yes this should do it but you have to make sure it is executed after the value is set