cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update image for Catalog items

I want to update images for 100+ of my App Portal catalog items. Can I upload all the .png files to C:\Program Files (x86)\Flexera Software\App Portal\Web\Backgrounds\Packages

Then run the following SQL update:

 

update WD_WebPackages

set ImagePath = 'pgFileName.png'

where PackageID =123

 

***the packageID would be changed for each item I want to target.

Is that safe enough? I don’t want to have to do this manually and I don’t fancy using the API either as I think I need ‘icon as a Base64’ value.

Thanks in advance 😊

(2) Solutions
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Yes, the steps you propose will work, and are safe.. 

P.S. Welcome back 🙂

View solution in original post

Yes, if you're setting them all to the same icon, then you can do that with a single SQL statement as you've described.  You could adjust it to the following...

update WD_WebPackages
set ImagePath = 'pgFileName.png'
where PackageID IN (comma separated list of package IDs)

If you are setting a different icon for each, you could do something similar using PowerShell with a loop that reads the packageID and filename for each one, or you could make sure the file names are correlated to the individual catalog items in some way (e.g. "<packageid>.png" or "<catalog title>.png" and then you could still do this in SQL by concatenating the appropriate column with ".png".

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

View solution in original post

(4) Replies
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Yes, the steps you propose will work, and are safe.. 

P.S. Welcome back 🙂

Thanks Charles, good to be back 🙂

Yes, if you're setting them all to the same icon, then you can do that with a single SQL statement as you've described.  You could adjust it to the following...

update WD_WebPackages
set ImagePath = 'pgFileName.png'
where PackageID IN (comma separated list of package IDs)

If you are setting a different icon for each, you could do something similar using PowerShell with a loop that reads the packageID and filename for each one, or you could make sure the file names are correlated to the individual catalog items in some way (e.g. "<packageid>.png" or "<catalog title>.png" and then you could still do this in SQL by concatenating the appropriate column with ".png".

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

Brilliant, Thanks for that too Jim. I'll use  both suggestions (as a few will have the same image, but there are some others which need their own individual image).