AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AugSQL
AugSQL
Passing Parameters ...
 
Notifications
Clear all

Idea - Planned Passing Parameters to SQL Queries

 
Votes Received: 0

AugSQL
Last Post by Tim Rodman 2 years ago
1 Posts
1 Users
0 Reactions
36 Views
RSS
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
Topic starter
July 16, 2023 11:37 pm
(@timrodman)
Famed Member
Joined: 10 years ago

This idea would depend on the completion of this Saved SQL Queries idea:

https://www.augforums.com/forums/augsql/saved-sql-queries

 

Currently, in the SQL Command field on the AugSQL (QQ900001) screen, you can use SQL like this:

DECLARE @MyParam1 VARCHAR(20)
SET @MyParam1='AACUSTOMER'
DECLARE @MyParam2 VARCHAR(20)
SET @MyParam2='ABARTENDE'
SELECT AcctCD, AcctName
FROM BAccount
WHERE CompanyID=2 AND AcctCD IN (@MyParam1,@MyParam2)

 

Which returns results like this:

image

 

What if you put the SQL Code above in the SQL Command field on the AugSQL Saved Queries (QQ900003) screen and save it.

Then, what if you could populate the @MyParam1 and @MyParam2 values at runtime in the URL. There would also need to be a parameter that tells the query to run. Maybe something like this:

https://mycompany.acumatica.com/Main?CompanyID=SalesDemo&ScreenId=QQ900003&Action=RunQuery&MyParam1=MyValue1&MyParam2=MyValue2

 

That would be interesting. Actually, that would change my approach to the Schedule Queries Idea (click here) so I'm going to add to that Discussion with another idea.

Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,521 Topics
  • 10.9 K Posts
  • 19 Online
  • 2,321 Members
Our newest member: Courtney Wilder
Latest Post: Can UDFs be populated using an Import Scenario?
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×