0

Locked out

If I go into Options, and Trigger After Open, and then paste in:

 

openTable("Contacts", "Cards");
popupRecord(record(Contacts,1));

Thereafter, when I open the database, it goes directly to the Cards view of my Contacts table and slides open the Contact detail form, which is really nice.

 

There is only one problem. I appear to be forever locked out of the view that shows the Data Model and Options tab. Is there a way to get back to that view? If I close and re-open the database it now always skips that view, per my Trigger After Open code.

 

I have reverted to a backup, but I am still curious if there is a key combination or some other way to skip the Trigger After Open action.

1 reply

null
    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    I figured out a way to avoid the lockout and still allow users to open a database directly to the table of their choice, try this example:

     

    1. create a database with Contacts, Transactions and Preferences tables.
    2. add a Choice field to the Preferences table with items:
    empty
    Contacts
    Transactions

     

    3. add the following under Options tab "Trigger after open":

    let v := text(record(Preferences,1).Choice);
    if v = "Contacts" then
    openTable("Contacts", "(all)");
    popupRecord(record(Contacts,1))
    else
    if v = "Transactions" then
    openTable("Transactions", "(all)");
    popupRecord(record(Transactions,1))
    end
    end

    To regain access to the Data Model and Options tab, set the Preferences Choices field to "empty" before closing database.

Content aside

  • 4 yrs agoLast active
  • 1Replies
  • 997Views