Custom Print Preview Actual Data instead of ID

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Custom Print Preview Actual Data instead of ID

Post by AhmedBR » 2013-10-17 01:03

I am working on a custom Print Preview and had this problem:

Some of the fields are look ups and I ended up having the ID instead of the actual data in the print preview

For example:
CategoryName = Truck
but instead of a Truck showing I got 1 (since 1 is the ID in the table where Truck is)!
Too bad for printing

The solution I found was very simple:
If 1 is showing instead of TRUCK then the Print Preview code is like this:

Code: Select all

<%%VALUE(CategoryName)%%>
Just change it to

Code: Select all

<%%COMBOTEXT(CategoryName)%%>
That is it, very simple really when you know the answer! ;)
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

TheCodeRed
Posts: 26
Joined: 2014-05-01 12:57

Re: Custom Print Preview Actual Data instead of ID

Post by TheCodeRed » 2014-05-01 14:28

Does this work for e-mail notifications as well? I am currently querying out the other lookup tables and assigning the values to output variables.

kheder
Posts: 2
Joined: 2013-06-12 22:13

Re: Custom Print Preview Actual Data instead of ID

Post by kheder » 2014-06-07 10:07

hi AhmedBR
I have a similar problem can you tell me where I can make the change to the code you post.
<%%COMBOTEXT(CategoryName)%%> :D

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Custom Print Preview Actual Data instead of ID

Post by AhmedBR » 2014-06-07 19:04

Not sure about email notification (did not try that).

for the second question, the canges where done in the template file of you table, files are located in templates folder.

YOURTABLE_templateDVP.html
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: Custom Print Preview Actual Data instead of ID

Post by toconnell » 2014-06-10 14:43

For the emails you can do a join with the table that the field is looking up with.. that should do it. :) I had same issue and used join in the query to fix it on the email send request.

Thanks, Tina
Tina O'Connell
Web Dev & Appgini FAN

Post Reply