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

Adding a visibility message and exclusion to items in bulk

We have general catalog items used for hardware in App Portal and are getting to ready to remove roughly 100 but we want to add a visibility message advising the user to order through a procurement channel and we want to add Domain Users as the exclusion so the message pops up and the item can't  be added to the cart.  This will allow the user to search for it without creating calls to our help desk if they no longer find the item.

Is there an easy way to do this in bulk based on the package id to the tables that require updating?  I'm trying to avoid opening each item and configuring the exclusion and message.

(1) Solution
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Not sure how much time this will save you 😀.  There are two things you would need to do.. First, in WD_WebPackages,  you would need to set the VisibleMessage column to the message you wished to display, and the VisibleShowMessage column to "1". You would do this for each of the general catalog items.  For example:

update wd_webpackages set visibleMessage='Please Contact Procurement', VisibleShowMessage = 1
where packageID in (1,2,3)

Second, you would need to insert a row for each catalog item into the table WD_VPackageProperty. The row would be the same for each catalog item, except for the PackageID_FK column, which would reflect the package ID of the general catalog item you wanted to add a condition to. If you decide to do this, then you can simply do this for one catalog item to see the values, and then copy the row. Note that the propertyValue will be the GUID of the group that you wish to exclude. Its easiest to add a condition first, so that you can get the GUID of the group.

View solution in original post

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

Not sure how much time this will save you 😀.  There are two things you would need to do.. First, in WD_WebPackages,  you would need to set the VisibleMessage column to the message you wished to display, and the VisibleShowMessage column to "1". You would do this for each of the general catalog items.  For example:

update wd_webpackages set visibleMessage='Please Contact Procurement', VisibleShowMessage = 1
where packageID in (1,2,3)

Second, you would need to insert a row for each catalog item into the table WD_VPackageProperty. The row would be the same for each catalog item, except for the PackageID_FK column, which would reflect the package ID of the general catalog item you wanted to add a condition to. If you decide to do this, then you can simply do this for one catalog item to see the values, and then copy the row. Note that the propertyValue will be the GUID of the group that you wish to exclude. Its easiest to add a condition first, so that you can get the GUID of the group.

I also have some PowerShell code that I can share, but I need to clean it up a bit before I can post.  It won't be exactly what you're looking for, but it should help as a starting point.

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".

Charles - This is great and will save a lot of time!  I have the GUID for the group and the package id's so I'll do some concatenation in Excel and get a couple queries together 🙂