Excel Reporting
 
Library Overview Reference Products Images Sales Stock Departments Formal Stocktake Restrictions Customer/Account Day Of Week Time Of Day Weather

Product Images

"product imageurl"
Returns a URL to access the first image for a product. The first parameter is the image PID or Physkey
=pinboard("product imageurl", 153)
returns
 /Openapi_7_3_2_2/media/product/153/8492ef5b0f0cdb14a4cfa3c0d1fa9849

=pinboard("product imageurl", 'KEPZIZFQN35QWLWESDYVYCYAAAGAZZAB')
returns
 /Openapi_7_3_2_2/media/product/KEPZIZFQN35QWLWESDYVYCYAAAGAZZAB/8492ef5b0f0cdb14a4cfa3c0d1fa9849
Note, there a space between the two words "product" and "imageurl".
"product imageurl excel"
This pinboard is recommended for most use as it
  • Returns complete display ready URLs for Excel
  • The resulting URLs are typically globally visible
  • The URL may return a smaller optimised thumbnail version rather than the full size original.
  • However, it requires some server side configuration before it can be used
=pinboard("product imageurl excel", 153)
returns
 https://some-public-server/images_1,2,34/8492ef5b0f0cdb14a4cfa3c0d1fa9849.png
This can be immediately used in Excel... (where cell B2 contains the Product PID to display)
=IMAGE(pinboard("product imageurl excel", B2))
Your query can include camera selectors
=pinboard("product imageurl excel camera top", 153)
returns
 https://some-public-server/images_1,2,34/sk29385hghe4h8gy4h58.png

This pinboard can also take (from version P270) a camera selector if your image definitions have this data stored

=pinboard("product imageurl camera top", 153)
returns
 /Openapi_7_3_2_2/media/product/153/8492ef5b0f0cdb14a4cfa3c0d1fa9849

The URL returned is one the server believes will work, however due to security and hosting conditions, it is hard for the server to know 100% if the URL will actually work. The URL returned is valid, but you may need to add a host name ("https://example.com") and when that is added the URL may change.

The server currently returns a URL structured for internal LAN use without firewall restrictions. URLs for public internet access can be completely different.


"product image count" or "product picture count"
Returns the number of images for a single product. The first parameter is either a PID or Physkey
=pinboard("product image count", 153)
=pinboard("product picture count", 'KEPHJRJBNSNRKJJS9KSMEK')
Note, there a space between each word. You may use either "image" or "picture" as the second parameter, they are interchangeable.

Can Excel display the Image?

Yes. Excel now has the =IMAGE() formula to display a URL. eg

=IMAGE("https://example.com/image123.png")
There are some restrictions though:
  1. Your Fieldpine Server must be using HTTPS
  2. The URLs must be open without password or security requirements

The best way to access images in Excel is to use a specifically designed option that returns the public URL automatically. This means you can simply use the pinboard inside the IMAGE() function.

=IMAGE(pinboard("product imageurl excel", PID))

This example spreadsheet shows the various options in action. You will need to change the Server parameter in cell B2 to your server, potentially change the PIDs to your products, and of course you must have the Excel addin installed

Other Ways to Access Images

Seperate to Excel, each image can be directly addressed with a standard URL naming scheme. Some examples

/Openapi/Product/153
Return the first known image for Pid=153
/Openapi/Product/153/2
Return the second known image for Pid=153
/Openapi/Product/KEPHJRJBNSNRKJJS9KSMEK/2
Return the second known image for product (physkey=KEPHJRJBNSNRKJJS9KSMEK)
/Openapi/Product/KEPHJRJBNSNRKJJS9KSMEK/abchdhejgh2gkjdj4i5hthv
Return the image for product (physkey=KEPHJRJBNSNRKJJS9KSMEK) where the image MD5 checksum is abchdhejgh2gkjdj4i5hthv. This is a complex format but ensures that you can address exactly a specific version. It is most commmonly used by eCommerce websites to retrieve exact images

There is also a "Media Dump" report at

/report/can/MediaDump.htm

This report lists all active media records with technical details such as size and MD5. If you mouse over a row, the corresponding image is displayed.

Click to zoom in