I have a Form: Job_Preparation
It stores details of each new item that must be built by the fabricators in our workshop.
The form has a field: Documents
I upload 4 image files to the Documents field.
I
want to print a sheet for our workshop staff with the description of
the piece they need to build. I want to include all the pictures I have
uploaded to the Documents field.
I have a Job_Preparation_List Report that lists all the Job_Preparation records. Next to each record I have a button: Print Job Sheet
The button has a workflow which opens a page and includes the Job_Preparation record ID as a parameter:
- openUrl("#Page:Job_Preparation_Sheet?jobPrepID=" + input.ID,"popup window","height=510px,width=420px");
I have created a Page: Job_Preparation_Sheet
It
has an HTML snippet which takes the parameter and searches the
Job_Preparation Form for the ID and returns the list of image files in
the Documents field. It then loops through the images and creates an
<img> tag for each one.
What URL format must I use to successfully display the images within the HTML snippet of the Page?
I
have published the page and have a long string of characters as some
kind of key. I have tried putting that in the URL but all I get is
broken images.
Help please. Thanks.
- <%{
resp = Job_Preparation[ID == input.jobPrepID];
imgs = resp.Documents;
imgslen = imgs.size();
for each img in imgs
{
imgname = img.getsuffix("/image").getprefix("\"").trim();
url = "https://creatorapp.zohopublic.com/file/MY_ACCOUNT/MY_APP/Job_Preparation_Sheet/" + input.jobPrepID + "/Documents/image-download/LONG_STRING_OF_CHARACTERS?filepath=" + img;
%>
<%=url%>
<img src="<%=url%>">
<%
}
%>
<%=imgslen%>
<%
}%>