You are viewing limited content. For full access, please sign in.

Question

Question

Feature Request: Option to Show Message if More Than X Number of Rows Are Returned

asked on March 6, 2024

We have several database lookups in Forms that have the potential to return hundreds and thousands of rows. The end user ends up just seeing the spinning icon until it eventually times out when this happens.

It would be nice if there was an option that could be set on a lookup rule that if more than X number of rows are returned to not run the full query and instead show a message on the form. Something like "The query has returned more than X number of rows and has been cancelled." It would be nice if we could customize the error as well.

3 0

Replies

replied on March 7, 2024

We can definitely look into messaging on hitting lookup limits. Right now you can actually limit the results at the lookup level so at least users can load the top relevant results based on your input parameters. They unfortunately do not support returning total row counts for pagination type queries or custom messaging if not all data is returned.

 

What type of lookup are you using that returns so many rows?

0 0
replied on March 7, 2024

Zach, how would you limit the results at the lookup level? I don't see an option for that in the interface.

In our case we actually would just want to kill the lookup and provide a message because if it is returning that many results, we need them to do things a different way that will kick off a workflow instead of having Forms do the lookup.

We have projects that are funded by AFEs. The AFEs can have hundreds or thousands of task lines that are returned. We have another option for users to use for those situations, but occasionally we get users that don't, and it causes issues because of how many rows are being returned.

0 0
replied on March 7, 2024

Well I made the assumption that you are using cloud, but I don't think that was accurate.

 

You would need to use a stored procedure with a LIMIT parameter that forces the results to only return the TOP LIMIT results. The out of the box UI doesn't support that type of query.

 

I have been in a few conversations about overall performance when working with large datasets and being able to generalize lookups with this type of information would be a high priority for both cloud and self-hosted. Then it would likely be a matter of the form itself supporting custom error messages on this type of event.

1 0
replied on March 7, 2024

Yep, we are using self-hosted. I was guessing that a stored procedure would need to be used in that case but wanted to verify.

0 0
replied on March 7, 2024

With stored procedures you could do all of the pagination you needed yourself as well as warning if there is additional data. Still should be supported out of the box. I'll have a chat with the lookup team and see if we can come to a consensus on this

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.