I'd love some help with a project; I'm not even sure if it's possible. I am trying to use data blaze to track various medication indications, doses, and dosage forms, then use text blaze to select desired medication, desired indication, and desired dosage form, and it calculates a dose based on the data. I know that I can read from a table to input variables, but is there a way to read from a table and select one row, then select a specific variable within a cell (if that makes sense)? Like after selecting Medication 1, can it generate a dropdown with all of the indications/reasons for Medication 1, then after selecting a reason, a dropdown of the forms? Below is what the table I'm imagining might look like. Let me know if I need to better explain myself.
Hi @efgillmore ,
Does this work?
{dbselect: SELECT Name, Form, Reason, Dose FROM Table1; space=id; menu=yes} Medication: {=name}
Form: {formmenu: values={=split({=form},",")}; name=selected_form}
Reason: {formmenu: default=; values={=split({=reason},",")}; name=selected_reason}
Dose: {=dose[{=selected_reason}]}
Wow that's awesome, thank you. One thing though that I am running into is when switching the medication selection, the previously selected form and reason are still showing up as options for the new medication. Any thought on how to get rid of those?
Yeah, that's a tough one. Text Blaze won't remove a value that's already selected.
You could add an empty row to Data Blaze and make sure it's the first one that shows up in the selector (by sorting the results ascending alphabetically).
