Research notes in Flex Header

Hello All,

I'm working on setting up Flex Headers in preparation for v16 and am struggling a bit with my limited knowledge of SQL to create a custom element that will display an icon when a specific note type is present on the record.

We had this element in our Infomaker headers but it's not working as a direct copy over.  

Anyone willing to tell me why my SQL isn't working here or share your SQL if you have a similar custom element in your database?

Select top 1 note_type from dbo.lv_sct_notes where note_type=6 and customer_no = @customer_no

It is returning the icon, but unfortunately it's returning the icon for every constituent in our database regardless if they have the note or not.

Thanks for your help!

Kanani

Parents
  • Hi Kanani! Your SQL is pointing to what appears to be a custom SQL view in your system called lv_sct_notes. Since it's custom, there could be something built into the logic that is causing issues for you. 

    Here is some replacement code using the standard SQL view:

    SELECT TOP 1 note_type FROM VXS_CUST_NOTES WHERE customer_no = @customer_no AND note_type = 6

    I will add this snippet to our forthcoming Flex Header Recipe Book. 

    -Michael 

Reply
  • Hi Kanani! Your SQL is pointing to what appears to be a custom SQL view in your system called lv_sct_notes. Since it's custom, there could be something built into the logic that is causing issues for you. 

    Here is some replacement code using the standard SQL view:

    SELECT TOP 1 note_type FROM VXS_CUST_NOTES WHERE customer_no = @customer_no AND note_type = 6

    I will add this snippet to our forthcoming Flex Header Recipe Book. 

    -Michael 

Children