Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Recommended Posts

  • Newbies
Posted

We have our images  as PDFs stored on google drive and the container field is linked to pull these PDFs based on the item#.  recently we have converted all our PDfs to JPGs and uploaded everything to google drive and changed the container type to .jpg and the images are not linking up. What am I doing wrong? I am not a programmer but just trying to get this simple thing to work. Below is the code where I have changed the $fileExt to PDF to JPG. 

BE_ConvertContainer ( PRODUCT_IMAGE::photo ; If( $fileExt = "jpg" ; "JPG" ; $fileExt ) )

Any help is appreciated on this.

Posted

I don't understand your description at all.

You seem to be saying that you had a container field displaying PDFs stored on Google Drive. I don't know how that's possible, but let's suppose it is.  And you say that "the container field is linked to pull these PDFs based on the item#". I think that means the field is actually a calculation field, and it calculates the path and filename of the PDF file it is supposed to display.

In such case, all you would need to do make the field display a JPG file instead of PDF (with the same name, at the same location) is change the calculation formula so that it returns a result with an extension of ".jpg" instead of ".pdf".

I don't see how BE_ConvertContainer() function would be relevant here; I believe it is designed to deal with container fields that embed the file.

All of this is just speculation upon speculation, so please clarify.

 

  • Newbies
Posted

 image.png.92013bb992f0bcdaf60b4c6b4a29e7b9.png

 

Photo is the name of the container object.  the syntax to get the file extension - removeRemotePrefix( GetValue( GetAsText( photo ) ; 1 ) )

 

If the image is .pdf it shows up - image.png.5a020a184bf08ea3534588f144eed09a.png

But if only .jpg extension is available I get this 

image.png.8dfcc9aa69e87debdf3e1403ef78e867.png

 

Hope these screenshots help with what I am trying to get to. 

image.png

Posted

I am afraid we're not making any progress here.

Please clarify: is the Photo field defined as a Calculation field? If yes, what is the calculation formula?  If not, please pick a record where the field successfully displays a PDF file, and show us the exact result of calculating GetAsText ( Photo ). Keep in mind that the result may contain several lines; make sure  you show us all of them.

 

  • Newbies
Posted

No photo is not defined as calculation as far as I know. ZctFileName Container and FileNameExt are the 2 fields that I am referring to where the extension is gotten from . 

 

image.thumb.png.3ea58f673444ecc585058b38fe2a46d5.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.