0

custom form in a table view - weird issue

Hi -

I have several forms created as user interfaces for our database. One sits in a staging table where we import .csv files to track event attendance. The process is basically 1) use the standard import wizard to import the file, 2) review the import in the staging table, and 3) either complete the import by pressing the "merge" button (works fine, exactly as we need it to), or decide to abort the import by pressing the "cancel" button.

The cancel button clears the staging table (desired behavior) and makes the form screen go blank (less desired). I can get the form back either by hitting the + sign to create an empty record, or by moving to the "all" tab and back again. Otherwise the scripts work fine, but it's confusing to my users. Could this have something to do with forms in an empty table?

Screen shots of the before/after hitting the cancel button attached, and here's the cancel button script.

delete (select Attendance_Staging);
let dummy := (create Attendance_Staging);
void

Thanks in advance for any advice -

Best,

Dave

4 replies

null
    • Fred
    • 2 wk ago
    • Reported - view

    That is the issue with creating UI in data tables. You need a record to show the UI, so once you delete all records you have nothing to show the UI.

    One solution would be to put a new parent table above the staging table that will only contain 1 record and be your UI.

      • Dave_Airel
      • 2 wk ago
      • Reported - view

       But doesn't the second line create an empty record? So at the end of the script there is an empty record? I'm willing to try the child table approach, I'll do some reading on that. Thanks --

    • John_Halls
    • 2 wk ago
    • Reported - view

    Hi  Why are you deleting the parent Attendance_Staging table, and not leaving that in place and just deleting the children in the Attendance_Import_Staging_Table intead? No need for select, it's just

    delete Attendance_Import_Staging_Table

    Regards John

    • Dave_Airel
    • 2 wk ago
    • Reported - view

    The original script (I think @Fred helped me make this one work) clears the table but doesn't delete it. Creating the empty record after deleting all records left me with weird behavior. With some help, I modified to leave one blank record w/o deleting it. Now working.

    let ui := this;
    delete (select Attendance_Staging where Id != ui.Id);
     

Content aside

  • Status Answered
  • 2 wk agoLast active
  • 4Replies
  • 32Views
  • 3 Following