Ever wanted to have a CCK field that fetches data from an external source and displays it? Something like node or user reference but for external data? Yep, we've all (probably) been there.

I managed to put together something that lets me fish data from our internal API (which supplies many of our services with miscellaneous data from resources to domain location), store it in Drupal and output it using additional data from the API if using more advanced formatters.

I'm having one of those grin on your face moments ATM. Enjoying it while it lasts so to speak before the herds descend to test every nitty gritty of it.
 

Step 1: Empty resources field

Step 1- field with no value

 

Step 2: choosing a resource from a set returned by the API

Step 2 choose value

Step 3: updated field based on selection made in step 3

Step 3 external value displayed

Step 4: output on a page

step 4: output on a page

If you want to achieve something similar, here's a hint - I got my ideas from filefiled/filefield_sources/nodereference_explorer code.

It's quiet in here! Why not leave a response?

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.