For searching name from Xano database in Draftbit

Options
Harshajit
Harshajit Member

Am building an app in Draftbit using Xano as database to search for doctor from a list of doctors and their details. How should I set my API Endpoint in Xeno and what path should I write in draftbit endpoint?

Tried whats already provided not working?

Comments

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi, can you provide some more details? Did you start building search endpoint in Xano already?

    IF you want to use fuzzy search then you need to go to the table you want to search through, open indexes tab and create search for the fields you want to be included in search.

    After that you should be able to see this "search index" in this table queries, you need to pick it from the list in custom query, use the search operator and on the other side should be input with the text you want to search.

  • Harshajit
    Harshajit Member
    Options

    yes i did tried fuzzy search as shown but couldn’t do the search in draftbit. What endpoint path should i use in draftbit to search in Xano for example if my table name is doclist how should the path be?

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hmm I don't have experience in Draftbit, can you show how it looks in Draftbit?

    Either way maybe @Ray Deck will be able to help here better than me. He is running an awesome community https://statechange.ai/

  • Harshajit
    Harshajit Member
    Options

    its not retuning any value in search

    Can u show what endpoint path to use

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Generally when you want to call an endpoint from front-end you are using the Endpoint url which can be copied here:

  • Harshajit
    Harshajit Member
    Options

    tried that but it returns the name when I search with id. I want to search using the name field,

    What should be the query?

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Can you please provide some screenshots from the endpoint function stack in Xano and the table that you want to search in?

  • Harshajit
    Harshajit Member
    Options

    Am trying to search from Name field in Draftbit, when Run in Xano it shows but the endpoint to search from draftbit is not working. Please help what endpoint to write and if need to do different setup.

  • Harshajit
    Harshajit Member
    Options

    please help in setting the Xano API as well

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi, so first of all I would suggest using fuzzy search feature, that you can set up on table page in indexes tab. https://docs.xano.com/working-with-data/search

    Secondly regarding you error, status 400 means that server can't process your request so the problem lies most probably on Draftbit side and there is some mistake there.

    Can you show the step 1 in the Draftbit?

  • Harshajit
    Harshajit Member
    Options

    Tried with search as well not working. Please show how to do fuzzy search for draftbit

  • Harshajit
    Harshajit Member
    Options

    Also, I am from Sydney Australia, and using free plan currently, can it be limited because of that?

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    I don't think so, your place or plan shouldn't be a factor here.


    My lack of experience with Draftbit is not helping here. I can't see a straight reason here.

    Last thing that you can share, so I can check is the output of the endpoint in xano debugger and in Draftbit.
    I want see how the calls looks like here and there.

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    Hey @Harshajit we can probably break down the question a bit.

    1) If you use run-and-debug to test this function stack within Xano, are you getting the results you would want from this endpoint? That would allow us to isolate intra-xano issues.

    2) Can you click on the "three dots" icon in the upper-right and look at the request history of your endpoint? Click a recent request and then examine the inputs. This will show you what Xano "heard" from draftbit. A cool thing we can do is copy-and-paste those inputs into the input field for run-and-debug to see whether the same inputs generate a good output. If so, we can move to the third step, which is:

    3) Examining the outflow of data from draftbit to see what is being sent. If the data is going into xano wrong, we can ask why at that level.

    If we attack the problem through these three steps, we can make more progress faster.

    We work on these kinds of intersectional issues every business day as part of our focus on the hardest 5% in daily office hours and loom-based forum posts on Statechange. Our next office hours is 9a Tuesday Sydney time!