Hello!
I was adding an icon in flex headers based on if an attribute existed in the constituent profile. It is an attribute that we created to assign a constituent profile to a specific company so that when users who do not work for that company come across it, a stop sign icon will appear in the Flex Header for them to know that the constituent doesn't "belong" just to them and to proceed with caution when making edits to general information. The attribute itself is generated through the Manage Attributes utility with these settings:
It's set to run daily so that if someone processes a gift for that company or purchases a ticket, the attribute will be added and then the stop sign will be generated for those who don't work for that company.
When I tried it out in Test, it worked correctly and had been working correctly in Live until lately. Now, the stop sign is appearing in the Flex Header even if the attribute doesn't exist for any company. Here is an example when I'm logged in for a user who has that flex header and even if I was in Sys Admin, the constituent doesn't have any attributes:
I can't quite figure out where the disconnect is. I used the code that was in the Flex Header Recipe Book for attributes:
SELECT TOP 1 key_value FROM VXS_CUST_KEYWORD WHERE customer_no = @customer_no AND keyword_no = 525,526,527,528,529,530,531,532,533,534,535 ORDER BY create_dt DESC
Anyone have any ideas?
Thanks,
Katie Cullen
You might try:
SELECT TOP 1 key_value FROM VXS_CUST_KEYWORD WHERE customer_no = @customer_no AND keyword_no IN (525,526,527, 547) ORDER BY create_dt DESC
I tried that out and it is still appearing :/
Kathryn, do you have SQL Server Management Studio access? Are you able to run the query in question there to see what is coming back? I don't actually know how conditional images work in flex headers, but presumably whatever is coming back from that query is being interpreted by the header as a value that triggers the image display.
I do - I found my error - I failed to switch to IN in the coding and left it as = with the parenthesis as Michelle suggested! Once I changed it, the stop signs went away... but they went away for all constituents. I realized it was because the attributes are control grouped so that each group only sees their attribute but I guess this also affects the ability for people not in that control group to see the stop sign... so now, back to the drawing board on how to alert users to accounts that other companies own without letting them know which company owns it... Thanks for both of your help!