Forum Discussion

WadeMyers1's avatar
WadeMyers1
Qrew Cadet
21 days ago

Limit the number of displayed rows in reports when editable on the form

I'd like to limit the number of rows displayed on a report to only rows where data already exists. 

I have several forms where a report is editable whenever displayed on a form in edit mode. The risk is that users can type in those rows. I've done scenario testing and I can see how a user could create some problems that will actually get them locked into a no win scenario where they are in conflict with form rules and unable to remove the extra rows created while unable to proceed. It's particularly true if one of the fields is a required field. Obviously orphans can occur if they have to close the browser. Below is a screenshot of an example where the report renders 3 rows but shows 4 additional rows.

Is there a way to limit editable rows to only those already containing data when rendered?

  • Interesting Question.  Basically you are asking how to ensure that users who have permission to add records, can only do so on a form and not on Grid Edit.

    There is not a way to hide those 4 blank rows at the end of the Grid Edit report. 

    One work-a-round would be to initialize a field called [How Entered] with the text value of say  "Entered on Form".   So just create a formula field with that formula and then convert it to a text field type.

    Then put in a form rule that say when [How Entered] is not equal to Entered on Form change it to Entered on Form.

    Put that field on the form either as Read Only or in a section hidden by a form rule.

    Then go into a Custom Data Rules in Advanced Settings for the child table and make an error message formula that says

     

    IF([How entered] <> "Entered on Form", "Not allowed to Enter Data in Grid Edit")

    You will find that when you go to save the record in Grid Edit that users' attempts to add children via Grid Edit will be thwarted with that error message displaying as a prompt of what to do.

     

     

     

    • WadeMyers1's avatar
      WadeMyers1
      Qrew Cadet

      I'll have to give that a try. I'm not sure it works for every case, just because I found that if you activate a record that has a required field it doesn't easily let go. As I recall, during testing I typed in data to a field and the deleted it to see what happened, and it kept throwing the required field error and essentially wouldn't let me back out of it.

      I think another way to handle it could simply be not to display in edit mode but get give the user an edit button in the row on a report line and either give them a pop up or open in same window.