A couple of notes on your questions:
- When you create a new record, is the alphabetical filter still in place in the portal? If so the new blank record cannot display because it is not yet an alphabetical match. You can get around that if you go in and set a value in the appropiate field when creating the new record, commit the record, and then reapply the alphabetical filter to the portal. All doable with careful scripting of the new record creation.
- A filter with no match cannot display a blank record because there is no such record matching, and that's what you are displaying. You could design the screen so that a notice that no record matches appears via layer of layout objects and Custom Formatting.
I solved my problem partially.
I had two scripts
1.- On the Alphabet to scroll up and down the alphabet highlighting the menu on the left. It seems this script was not needed as I took this out and still works - I think because I have a global field related to an occurrance of the same table to produce the Alphabet.
By eliminating this script, now my creation of new record works fine
2.- My second script still in place is to set variable so that we can set field on the right of the screen and update information accordingly.
But now when I click on the letter and there is no results for this letter I dont have any custom dialog advising me to make anoter selection
You could set up an onObjectModify trigger script for the letter selection field.
You will need a specific relationship (not just a portal filter) for the letter-match so that you can get a count of the related records for that letter, and have it popup a custom dialog if the the related record count is Zero.