After performing a search which results in no records found.
Then I want to re-enter find mode and reload whatever texts were entered in the previous search.
How can I do this using a method.
Thanks.
After performing a search which results in no records found.
Then I want to re-enter find mode and reload whatever texts were entered in the previous search.
How can I do this using a method.
Thanks.
You can’t do stuff while you are in find-mode, so the way you want it, is not possible right now.
You could also fake find-mode by creating a seperate form, and create a record for every ‘find’ than do the find by method, if no records found, go back to your fake-find screen, and reload the data that was typed in.
(I do’nt think you want this, because that’s a lot of work)
Thanks for your info.
I would be happy if this can be done easily. I do not want to do the second way. It’s a lot of work but also it is an ugly way of doing it.
I will add this as a feature request.
You can do this in a ‘fairly’ easy way.
Create a main search form with a separate foundset (important when you use the same table as your search form!).
On this form you create all your buttons and methods you want to use in find mode.
Place a (hidden) tabpanel on this main form that shows a unrelated search form.
Now all you need to do it set this unrelated search form in find mode and you are set.
Hope this helps.
Can you be more clear on this.
I already have main form.
for ex: in the section name is contact
I have following forms:
contact$main (which is a main form)
contact$list
contact$detail
contact$modify
contact$find
All forms related to the table contact.
now can you explain how could I do modify search.
To be able to execute code during find mode you need to work from a form that isn’t in find mode.
So create another form (with separate foundset enabled) where you place your contact$main form in a UNrelated tabpanel.
Now from this newly created form you can set the contact$main form in find mode via a method. (this will set any related forms also in find mode).
After this you can (re)populate your fields via that same method if you like or create a new find request (controller.newRecord()) and fill that out.
You can do all that as long as you don’t have relations going more than 2 relations deep. But from what you just told me you have everything 1 relation deep so this should all work.
Hope this helps.
Thanks Robert,
I will try out your idea.
Thanks,
Hameed