Skip to main content
Question

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


Forum|alt.badge.img+6

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?

MarkShnierYou
Forum|alt.badge.img+24

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.