Operations with records to display HTML document

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
JHew
Posts: 27
Joined: Thu Jun 25, 2020 12:23 pm

Operations with records to display HTML document

Post by JHew »

Hello,

I have a query which shows some basic infromation and I have added a button using operations with records using 'Create Document' to dispaly a HTML document in a pop up wondow. However, when pressing the button the new window pops up and where I would expect to see the information related to the instance defined in the query, it instead shows "<>"(Picture attached).

I have defined my tags as <<businesObject.Atribute>> as it said in to in the user guide. I have also read through the user guide looking at the context and document sections but still cant understand why this is happening??
Attachments
Annotation 2020-06-25 133325.png
Annotation 2020-06-25 133325.png (14.47 KiB) Viewed 6740 times
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Operations with records to display HTML document

Post by Jaymer »

In your html doc, you need to be doing this:

<<bo.fieldname>>
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
JHew
Posts: 27
Joined: Thu Jun 25, 2020 12:23 pm

Re: Operations with records to display HTML document

Post by JHew »

Hi Jaymer

Ive tried adding <<bo.fieldname>> and removed the "<< >>" however when i try and create the doument it comes up with error "Server was unable to generate the document".

Any ideas why this might be happening?

Code snippet:

Code: Select all

<!DOCTYPE html>
<html>
<style> 

.MDtable {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}

</style> 

<body> 

<div class = "MDtable">
<table id ='MDtable'>
  <tr>
    <th>Sales Order</th>
    <th>Service Order</th>
    <th>Part Number</th>
    <th>Customer</th>
    <th>Hours</th>
    <th>Operator</th>
    <th>Date</th>
    <th>Missing Components</th>
    <th>Missing Quantity</th>
    <th>Reason</th>
    <th>Photos</th>
  </tr>
  <tr>
    <td> <<Main_Planning_Data.SALES_ORDER>> </td>
    <td> <<Main_Planning_Data.SERVICE_ORDER>> </td>
    <td><<Main_Planning_Data.MATERIAL>></td>
    <td><<Main_Planning_Data.COMPANY>>
</td>
    <td><<Main_Planning_Data.MDHours>></td>
    <td><<Main_Planning_Data.Name>>
</td>
     <td><<Main_Planning_Data.Date>>
</td>
    <td><<Main_Planning_Data.P1>>
</td>
    <td><<Main_Planning_Data.Q1>>
</td>
    <td><<Main_Planning_Data.R1>>
</td>
    <td> <<Main_Planning_Data.Pic1>></td>
  </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td><<Main_Planning_Data.P2>></td>
    <td><<Main_Planning_Data.Q2>></td>
    <td><<Main_Planning_Data.R2>></td>
    <td><<Main_Planning_Data.Pic2>></td>
  </tr>
JHew
Posts: 27
Joined: Thu Jun 25, 2020 12:23 pm

Re: Operations with records to display HTML document

Post by JHew »

Figuered it out - I had my from data set to pull from a query, when changed to determin at run time it works.
Pomegranate
Posts: 33
Joined: Sun Jul 16, 2017 11:53 pm
Location: Mongolia, Ulaanbaatar

Re: Operations with records to display HTML document

Post by Pomegranate »

Hi JHew,

I assume this code snippet is only half of what you got, because the <table> tag is not closed at the end,

Also, have you tried using the CSS styles in a differen place such as a file in the CSS directory in Aware instead of putting it in with the HTML codes?
Post Reply