Forum Discussion
Brilliant that worked thank you!
By the way, any recommendations on learning java? Or just, look around for courses.....
------------------------------
Mike Tamoush
------------------------------
I'm sure everyone will have a different answer than me, your best bet is to just get the basics with something like codecademy or simple courses on Udemy just to get structure, syntax and the overall basics down. Beyond that - it's just trial and error. If you're just focusing on codepages then you only need to focus on HTML, CSS and Javascript, along with a general understanding of APIs and specifically the Quickbase api outside of the context that you use them in native URL buttons.
Beyond that - it's just practice. You won't find any kind of training of guides to Quickbase codepages so really just comes down to finding a use case and slogging through it to learn.
------------------------------
Chayce Duncan
------------------------------
- MikeTamoush2 years agoQrew Elite
Yep, that's exactly what I am doing. Except, consider this scenario.
Max Record ID = 100. Thus, when I run the code page, I land on Record ID 101 (100+1). Perfect.
Now this scenario:
Max Record ID =101. User deletes Record 101. Now Max Record ID =100. Thus, next record created will be 102, but the code page will try to navigate to Max Record (100) + 1, or record 101 (which has been deleted).
Two possible solves I see: Make it so the user can't delete the max record. Or, make an action so that if the max record ID is deleted, a 'dummy' orphaned child is created, thus ensuring that the next Record ID created will still be Max + 1.
I went with option 2 and it is working.
The real issue is we keep saying we want the Max ID + 1, but in reality we want the NEXT Record ID created, which USUALLY is the Max ID + 1, but not always. The above action now makes it always that way.
------------------------------
Mike Tamoush
------------------------------ - MikeTamoush2 years agoQrew Elite
Thanks.
Also, my plan was close to brilliant except it fails if someone deletes the most recent child. If so, then the max Record ID of the table may be 100, but in reality the next record ID created will be 102. I can probably get around this by creating a dummy orphaned child any time someone deletes the most recent record ID, but even though it works, I don't love my solution. Either way, your code is awesome and I will use it in some fashion. Thanks!
------------------------------
Mike Tamoush
------------------------------ - ChayceDuncan2 years agoQrew CaptainAre you using some kind of Master table setup? If you have that you should be doing the max of the record ID of your child table into the master and then passing it down to use that value + 1 into your button