Newbie trying to figure out how to do two fairly simple tasks

Hi All,

Just for reference, only signed up yesterday so still very new to this. I’m trying to accomplish two specific fairly simple tasks but I just can’t seem to get the result I want.

I’m trying to develop a simple field guide app for our Ambulance district. The idea for now is to list our local hospitals we commonly either transport to, or transfer patients to with contact information. Also it would have a simple calculation section that would take a patient’s weight and show some common drug dosages based on that input. For example, patient weighs 44kg. The user inputs 44 into an input box, then the app would calculate different formulas based on that input to show a dosage to use. There’s a few other things I have in mind but I want to get off the ground with the basics.

Task 1:
I have a list of hospitals created in a database in my App. I want to allow the user to search by name, then both display that entry’s data in the list, as well as drop a pin on the map element I have on the page. I can’t seem to get search to do anything. I have the search element on my page, and set it to search the name field for data, but no matter what I do I never get a result.

Task 2:
As mentioned above, I want to create a basic calculation based on user input. I installed math.js local to try to evaluate, and I have my formula set as shown here:

This seems straight forward enough, but the issue is when I preview I get an UnexpectedError: Expected a number, but got a number. Which makes no sense to me. If there’s an easier way to accomplish this I’m all ears.

Any help is greatly appreciated!

This 25min video is a walk-thru of key app building concepts that may be useful for point 1

1 Like