Searching from an external database via API

Hi,

I know there are a many forum posts on API’s, but I have searched and searched and can’t find the answer I am looking for.

Essentially, I have an API, which connects to external data, containing information about drugs. There are two databases that I need to connect to. One for the name of the drug (Drug names). One for a description of the drug (Interactions). I think I have connected to this correctly. See below:
API CONNECTION

DESCRIPTION DATABASE

DRUG NAME DATABASE

I would like to have a Search box (which I don’t think I can do, but obviously happy to have an Input element), whereby when the user searches, it will find the drug in the drug names database, and return a field from the description database, based on the drugs name.

Any help would be greatly appreciated. I have spent more time on this than I know I should have.

Thanks.

Bump.

What exactly is the problem?.. what you’ve tried isn’t working?

Honestly, I just think I don’t know how to do it.

So, I’ve set up an input. Then Two repeating groups. the first one would just return the name of the drug found in the first database, as searched by the Input element.

The second RP would take this drug name and, by using the DRUG_ID found in the first database, locate the DESCRIPTION in the second database.

So, at the moment, it just looks like this:

But I can’t even get the first RP to show the output from the input search. This was my current approach:
This for the repeating group

Then this for the text element within the RG

So, I would need this to search the Drug name database, and return the drug name. Then use this Drug name’s ID, to search the Description Database to output the description of that drug.

Bump bump

It’s a bit hard to follow what you’re saying… and without seeing the API docs I can’t really comment on a specific API…

So, if you can share the API docs that would be a start…

Are your two separate API calls working as expected when you initialize them?

API’s are seem to be working correctly, individually.

This shows the two RG’s I have. Left is connected to the Drug database. Right is connected to the Description database.

I now just need to have a input that searches the drug name database. Essentially, the input will have a drug name, it will extract from that an ID, and then use that ID to search the description database. And return the description.

Again, without seeing the API docs I can’t comment on the specifics of the API, but if you’ve got dynamic values in your API calls then it should be as simple as setting those values to the input values on your page…

Thanks, mate. Is there something I can look over that outlines how set the API dynamic values to the input values? A documentation or walkthrough or anything?
Thanks heaps.

Ok. I’ve managed to get somewhere.
I can filter the database, based on the inputs value:

Now, I just need to find a way to autofill the input variable.
Any help on this, would be greatly appreciated.
There are a lot of other forum posts on this, but they all seem to be for Geographic locations and addresses, which is very specific to the Google API, and doesn’t really help me.

Any info on how I can autofill my input element based on the Drug name database would be amazing.

Thank you.