How can I pass a largeish XML block to a code page when a record is saved?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a table called "Text Blocks." Every record in this table contains 5 Multi-Line Text fields called "Text 1," "Text 2," "Text 3," "Text 4," and "Text 5."

When I save the record, I would like for each of those text fields to become its own record in a table called "Text Entries." 

In the past, I've been able to do something similar by adding a Formula URL field to the "Text Blocks" table that points to an HTML code page that I've created. Contained in the URL are several "URL variables" that contain the data the user has entered into the fields. The HTML code page contains some javascript that pulls these variable out of the URL and plugs them into a CSV string variable, which is then passed to API_ImportFromCSV, which creates the Text Entry records.

HOWEVER, I suspect that method won't work in my case, because when this app goes into production, each Multi-Line text field is likely to contain thousands of characters, and I bet passing that data in a URL variable will probably break something.

So I'm wondering if there's a better way to pass those Multi-Line Text fields to the code page. I'm thinking maybe I could do something with XML, but I've been racking my brain all day and can't seem to come up with anything. Can anyone help?

Photo of Sean

Sean

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
Use the Save and Scooby Doo Technique to immediately call a script after the original record is saved. This script will (1) grab the five fields from the newly created records using an AJAX call (API_DoQuery) and then (2) make five additional AJAX calls (API_AddRecord) pumping the five text blocks into new records (in a second table I hope). See


What is the Save and Scooby Doo Technique?
https://quickbase-community.intuit.com/questions/1298548-what-is-the-save-and-scooby-doo-technique
Photo of Sean

Sean

  • 0 Points
Thank you for the quick response. In your answer on that page, this link appears to be unavailable to me: https://haversineconsulting.quickbase.com/db/bkjdxnw2x?a=nwr

Is that intentional?