Add support for
Add a property to SPDisplayRelatedInfo to enable CAMLOnly. This means if you set a CAML query in CAMLQuery it will execute this query only, and not append an id or title filter. This makes the function very flexible in terms of bringing in related data based on arbitrary data besides the item selected - which may or may not be part of it.
This feels like a different function, since the goal of SPDisplayRelatedInfo is to show the info related to your selection.
Can you flesh out the use case a bit more?
Basically I pick something in a drop down, but I want to show related items based on other fields in my form, not the id from the dropdown. I know it sounds weird :)
I have a form "Orders" with related column "Items". When I pick an item, I want to show other Orders with the same item selected. Which actually might be doable - but my previous logic had to filter on some other fields in the form, not the chosen item.
I guess I sort of used your function to avoid writing code to trigger on the changed drop down.