Forum Discussion
The reference field on the right side of the relationship needs to be populated by the API with the value of the key field of the parent record. Then all the lookup fields will populate.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Hey Mark,
I thought more about what you said and, before I went into redesign, I managed to get the report link field to populate using the key. Unfortunately, other lookup fields to yet another table are based on an email address field. Those fields don't normally populate until the email address is entered and then the field "clicking" out of the field to let things calculate. Using the formula URL, those fields do not populate until after I choose to edit the newly added record. Any suggestions for how to handle that? Do I need to redesign anything?
------------------------------
James Carr
------------------------------
- JamesCarr2 years agoQrew Trainee
Immediately after I posted this, I thought about what the problem likely is. Dynamic form rules. I had an issue with the lookup working due to case sensitivity so, I have a hidden field that picks up the LCase of the email address. The lookup is done based on that field, which can't be edited. Dynamic form rules are in driven by the email address and the hidden email address fields for setting what sections are visible as well as setting couple of checkboxes. Will the URL not work because of the Dynamic form rules? Is there another API call I can make that will trigger the form rules after the record is added? I am looking to avoid having the record shown while being edited, if possible.
------------------------------
James Carr
------------------------------- MarkShnier__You2 years agoQrew Legend
Sorry, but I'm not understanding the question.
I gather you're using an API to actually create a record so you were using the API of API_AddRecord
When you view that record the form rules would all activate in terms of show/hide, if you're expecting any formulas to edit the record then they will not fire until the form is put into edit mode. If you wanted any other fields to be populated to replicate what the form rules do then that would have to be built into the API_AddRecord. You can populate an unlimited # of fields with the one API. But, like I said I really am not understanding your question, this response may not help you!
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- JamesCarr2 years agoQrew Trainee
Sorry. So, you ended up answering my question, believe it or not. Lol. Unfortunately, I misunderstood my situation so, let me try again. I have lookup fields in the form. Some of them are for one related table and the rest for a 2nd related table. When I make the API_AddRecord call, only the lookup fields for one table is being populated. The other fields are blank. I do have the key for both related tables being populated with the API call so, I don't understand why the fields for one table are coming up blank. When I go into edit mode, they immediate populate so, I know the correct key is being added with the API call. Any input regarding that would be greatly appreciated.
James
------------------------------
James Carr
------------------------------