Page 1 of 1

Custom Print Preview Actual Data instead of ID

Posted: 2013-10-17 01:03
by AhmedBR
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! ;)

Re: Custom Print Preview Actual Data instead of ID

Posted: 2014-05-01 14:28
by TheCodeRed
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.

Re: Custom Print Preview Actual Data instead of ID

Posted: 2014-06-07 10:07
by kheder
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

Re: Custom Print Preview Actual Data instead of ID

Posted: 2014-06-07 19:04
by AhmedBR
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

Re: Custom Print Preview Actual Data instead of ID

Posted: 2014-06-10 14:43
by toconnell
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