Forum Discussion
AustinK
6 years agoQrew Commander
This might not be the best way but I like it. I build the html line by line with a loop. You know the ID of your select box already so you just have to clear the innerHTML and then build each option out. You need to get to a point where you have all the information you want to include in the dropdown and then just make it with a loop. "Selection" would be your select/dropdown menu and you would find that by ID and assign it to the variable selection.
I run the next part in a loop that goes over my array of info and builds a select option for each one with this line plus a few others that pull the info from my returned JSON.
selection.innerHTML += "<option value=\"" + recordID + "\">" + name + ": " + description + "</option>";
Hopefully I'm understanding what you are wanting to do here.
I run the next part in a loop that goes over my array of info and builds a select option for each one with this line plus a few others that pull the info from my returned JSON.
selection.innerHTML += "<option value=\"" + recordID + "\">" + name + ": " + description + "</option>";
Hopefully I'm understanding what you are wanting to do here.
- EOMDevelepors6 years agoQrew CaptainThanks for your reply. I am trying to show the options based on my array created in my code called xmlOptions. I just need to view the options from that array and show field 9 and the value should be field 8 which can be passed on later when pressing ok to update the record with that option.
Thanks again - AustinK6 years agoQrew CommanderWhat exactly is the issue you are having with it? Are you having trouble building the HTML select options form what is returned in DoQuery? I really only use JSON for this so I'm not great with xml.
There is a really nice Node.js SDK for Quickbase that I enjoy using that has made that easier as it returns JSON by default. I know you are pretty far into it but maybe it would help if you are also more comfortable with JSON. https://github.com/tflanagan/node-quickbase