Jump to content

How can I use Sort Records to get a single record?


Jesdamian
 Share

This topic is 2615 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I use "Go To Related Records" from table "Inspections" using Layout "Reporting Template"

 

After that runs, I have to run a "Sort Records" command. 

 

This template gathers data from fields within the Inspections table and presents it in a report fashion for customers. This report gets printed to PDF and is the deliverable.

 

When I use Go To Related Records, I see only the record I want to print. But if I dont include the Sort Records in the script, it reverts to creating a view with every record in the database.

 

each report is about 10 pages, so instead of a 10 page report with just the 1 record I want to report, I get a 500 page PDF with every record in the database.

 

I know I'm probably not explaining it properly. 

 

 

What I want is to run the script through a button that will create a report for only that record (or inspection)

 

I'm not sure how to do a sort to only get 1 record every time.  I have a unique record ID for each along with unique UUIDs since this project will be used offline with the help of mirrorsync

Link to comment
Share on other sites

"I use "Go To Related Records" from table "Inspections" using Layout "Reporting Template""

 

"This template gathers data from fields within the Inspections table"

 

Not clear. What are the tables and what are the relationships?

Link to comment
Share on other sites

ok let me see if I can show it better with a screenshot 

 

My apologies for some of the whited out areas. We're still in development and my company is extremely sensitive to security.

 

The script is activated via a button from within the application. This is the script that runs

 

NGx47oN.png

 

 

At the "Show related records" portion, a new window opens and shows only the record I want to print to PDF

 

If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. 

If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. 

In this screenshot, I took out the sort criteria while I work on defining something that will only show a single record. If I hit cancel or unsort, it will once again populate data for all records, not just the one record I want. 

 

tGlhusQ.png

Link to comment
Share on other sites

Being extremely sensitive to security is going to make it tough to diagnose this.

 

I do notice the layout in your screenshot is not the same layout you're telling the GTRR script step to use.

 

Also, these two claims appear incongruous:

"If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. 

If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. "

 

Do you have summary parts on your layout?

 

Are you using "export" to mean "print"?

 

Finally, sometimes it's not worth figuring out what is happening if you can fix it. You could simply grab the ID of the record you're on into a variable, go to the layout you want to print from and do a find.

Link to comment
Share on other sites

Do you have any script triggers attached to the target layout ("Report Template")?

 

none

Being extremely sensitive to security is going to make it tough to diagnose this.

 

I do notice the layout in your screenshot is not the same layout you're telling the GTRR script step to use.

 

Also, these two claims appear incongruous:

"If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. 

If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. "

 

Do you have summary parts on your layout?

 

Are you using "export" to mean "print"?

 

Finally, sometimes it's not worth figuring out what is happening if you can fix it. You could simply grab the ID of the record you're on into a variable, go to the layout you want to print from and do a find.

 

 

I just noticed the layout discrepancy. Ive been overlooking it all day. I'm going to work and see if thats got something to do with it, and figure out where the layout changes in the script process 

 

would probably be a good idea to walk away for an hour or so and clear out my thoughts. come back to it fresh. thanks. 

Link to comment
Share on other sites

alright, I guess we can disregard everything I've said previous.  I took a small break, came back and started working on a find script. 

 

looks like my issue was much simpler than what I've been looking at.

 

When doing an OS check, I put  " > 2 " as the check.

 

should have been " < 2"

 

so it was going to the next step, "Enter Preview" 

 

I just tested it, if I go into preview in the report layout, it will show previews for every single record. 

 

chalk this up to end user error. thanks all 

Link to comment
Share on other sites

ok let me see if I can show it better with a screenshot 

 

My apologies for some of the whited out areas. We're still in development and my company is extremely sensitive to security.

 

 

You can save a copy of your files using the “No Records” option, which shouldn’t give way any trade secrets. 

 

Attaching a copy of the files often speeds up the process of getting your problems solved.

 

If you have any problems doing this, or have some questions, contact me via the Private Message.

 

Lee

Link to comment
Share on other sites

This topic is 2615 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.