Submit Your Suggestions for Vista

Ideaspace topics with the most votes have been moved into the Suggestion Box. If there is a topic missing, please re-enter. Our product team reviews the Suggestion Box items regularly and will provide updates as to status and incorporation into upcoming releases.

Allow "Group By" subqueries AND @variables within notifier queries

When setting up a VA Notifier in the FROM WHERE field, the following conditions trigger an error:

  • If you have a @ symbol in the field AND

  • If there is a subquery with "GROUP BY" in it for a JOIN.


Your stored procedure dbo.vspVAWDTestQuery does not take the above condition into consideration. If it sees a @ symbol it then looks for "GROUP BY" and does some truncating, completely ignoring the idea that someone might have a GROUP BY within a subquery in a join, not just at the very bottom.


Why would it be useful to have a JOIN with a GROUP BY within it? It makes summarizing (or finding the last row of a thing) much easier. In my case, the last status update from a log.


I realize the goal of the TESTQUERY is to validate the SQL. With that in mind, are you aware of the following command?

sp_describe_first_result_set

https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-describe-first-result-set-transact-sql?view=sql-server-ver16

(Link above is just a link to Microsoft's page on the command).

Instead of hunting around for WHERE based on if @ does or does not exist, how about:

  • Get all the variable names together

  • Pass them to the procedure above.

This would remove your need to do truncating or searching for the WHERE clause.

This way it does not matter if any code is commented out, and it leaves ALL the SQL parsing to the engine. The only code you'd have to think about is how to detect the @names to build to pass to the procedure.

Please give this some thought.

Thanks.

  • Nathan Sutherland
  • Feb 14 2023
Company Cutting Edge Plumbing & Mechanical
Job Title / Role Lead Developer
I need it... 1 month
  • Attach files

Dear Viewpoint Suggestion Box contributor;

We at Viewpoint sincerely thank you for your contribution to Suggestion Box on how we can improve Viewpoint products. While we can’t do everything at once, we rely upon your feedback to help guide the prioritization of our product improvements, and Suggestion Box is a critical tool for us to understand and prioritize our customers’ needs. Viewpoint reviews Suggestion Box regularly for all of our products and updates statuses, adds comments, and performs various house-keeping (including deleting) as needed to ensure that Suggestion Box is maintained as a productive environment for product enhancements requests.

1515 SE Water Avenue, Suite 300, Portland, OR 97214 |  800.333.3197  | Contact Us | Terms of Use | Privacy | Support Policies

© 2023 Trimble Inc. All Rights Reserved. Viewpoint®, Vista™, Spectrum®, ProContractor™, Jobpac Connect™, Viewpoint Team™, Viewpoint Analytics™, Viewpoint Field View™, Viewpoint Estimating™, Viewpoint For Projects™, Viewpoint HR Management™, Viewpoint Field Management™, Viewpoint Financial Controls™, Vista Field Service™, Spectrum Service Tech™, ViewpointOne™, ProjectSight® and Trimble Construction One™ are trademarks or registered trademarks of Trimble Inc. or its affiliates in the United States and other countries. Other names and brands may be claimed as the property of others.