Need a data entry only screen - no edit
Need a data entry only screen - no edit
rbyrns
Posts: 36Questions: 9Answers: 0
I was wondering if there is a way that I can catch the fact that there is only one record set remaining in a search. On that event, I would like to have editor automatically create a new record using the input of the search - and prepopulate some of the other inputs as well. Of course I would also need to have the search cleared to prepare for the next entry.
Is there a better way?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can listen to the
length
event and see how many records are visible after the page length changes. There's also a property called "recordsDisplay" inpage.info()
which may help you.Interesting, I will try examining that. I think length will get me started. It might be a sub form that will need to be called. I haven't seen a multi page form example. Is that possible?
I would suggest listening for
draw
rather thanlength
actually.length
will only change when the requested page length changes.This one?
Allan
Interesting,
length
refers to the number of pages instead of the number of rows in a page?basically I am just needing a way to let the user put in a serial number from one database and then populate the form with data from the same database but then save it in a new database. I may be over complicating it.
Indirectly. It refers to the number of rows requested for a page. If there aren't that many rows, then the length doesn't change. For example, consider a display length of 25 and a table with 15 records in it. Delete a row so only 14 are shown. The "display length" doesn't change, it is still 25, so
length
isn't triggered, but the number of records displayed is changed.I would use
ajax.data
for the target table to submit the selected serial number and redraw with the server doing the filtering (there are lots of other ways of doing it, but that's the simplest).Allan
Oh I see, good to know. :-)