Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
I suggest that you create a native field which will do the "IF" in your app and then just have the API use that calculated field.
- RichardPfister8 years agoQrew CadetI have about 30 such conditions to check (60 fields in total). In your experience, will this still be the best approach?
- QuickBaseCoachD8 years agoQrew Captain:) since I don't do javascript and I don't know if XML can do an IF statement, that is how I would have to do it. Someone else would have to chime in as it if XML can do an IF without resorting to a code page.
- MichaelBarrow8 years agoQrew CadetI'm not a whiz with XML or Javascript either, but every time I have worked with my developer to have them code stuff to work for me in QuickBase, they have always had me do the formula or filtering or query decision logic directly in QB by creating formula checkbox fields for them first, and that way the code can be super simple and just pull records where the checkbox value for a single field is true. And if your business logic changes in the future, which it most likely will, you don't have to go rooting around in JS or XML code to find and update your logic.
Look at it this way: you are human. What is easier for your eye to read at a glance? XML or JS or QB formulas? For me, it's the last one. I also have more control over it directly because I don't want to be a JS coder. I have a business to help run. Like Mark, I want to get it done cleanly and quickly myself, preferably in native QB whenever possible. So, do the logic as much as you can in native QB. That will keep the complexity down in your code as much as possible.