Discussions

 View Only
  • 1.  Disallow adding records in Grid Edit

    Posted 12-26-2019 13:00
    Is there a way to not show the four new record rows in a grid edit report?

    I've got a table report embedded in a form. In edit mode the standard Grid Edit overrides to a form.

    ------------------------------
    Heather Bryant
    ------------------------------


  • 2.  RE: Disallow adding records in Grid Edit

    Posted 12-26-2019 13:05
    If the Role the user is in does not allow adding records, then those 4 blank rows will not appear.  I  believe that would be the only native solution.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Disallow adding records in Grid Edit

    Posted 12-26-2019 13:19
    Heather, 

    As Mark states, I do not think there is a native way to hide the 4 columns, but you can still prevent them from adding records.  If you create a formula checkbox, say [Existing Record] in your table and set the formula to  if(not isNull([Date Created]), true, false) and add this field to the grid edit form you created. Then under the advanced settings for that table, turn on the custom data rules and place a formula that states if([Existing Record] = false, "You cannot add records using this form").  Since the checkbox is a formula field, the user cannot edit the checkbox, all the existing records will already be true due to the formula (so edits can be saved) and the rule in the advanced table setting will be checked before the save and throw the error. So it will be very difficult, if not impossible, for them to add a record from that form.  I have not been able to test this extensively and it will not hide the rows, but it does prevent from adding new records.


    ------------------------------
    Brandon Drake
    JHI Group
    Monroeville OH
    ------------------------------



  • 4.  RE: Disallow adding records in Grid Edit

    Posted 12-26-2019 13:25
    Thanks, Brandon! Mark suggested using the custom data rules, too. 

    I did make a field required on the grid edit form and the user would not be able to add the record from the report if that field was't filled in. Given the field's purpose it should be evident to the user that they should not be creating a new record. But we can't assume! I like the idea of the custom rules so I can appropriately explain to the user why they can't add records. I'll test that out.

    Thanks guys,
    -Heather

    ------------------------------
    Heather Bryant
    ------------------------------