HI Mark,
I tried the formula but I'm having some trouble when it comes to replacing the line below with my own information
& "&_fid_6=" & URLEncode ([Purchase Order])Can you explain what this line is saying similar how you spell it out in your URL Buttons for Dummies app (very helpful by the way)?
I have a multiple choice field called [Type] and the field ID is 8. The options are Price, Sample, and Purchase. I want the newly created record to say Purchase.
I also have a text field called [Description] where users put in various information. I would like that field to be copied from the original to the new record.
Can you please guide me in the right direction toward accomplishing those two things?
------------------------------
Howard Fu
------------------------------
Original Message:
Sent: 01-15-2020 15:55
From: Mark Shnier (YQC)
Subject: API copy a record and change some fields
try this as a URL formula button I'm just on my iPhone do post back if there are any syntax errors
URLRoot() & "db/" & Dbid()
& "?act=API_AddRecord"
& "&_fid_6=" & URLEncode ([Purchase Order])
& "&_fid_17=" & [Qty]
& "&_fid_10=" & [Related Priced Material]
& "disprec=1"
for each field ID you need a new line for your own sanity.
if the data being put into the field might have text with spaces of special characters, you need to URLEncode as above.
if here are fields of type User or date they need to converted to text
Like
& "&_fid_17=" & ToText(User field])
the last line says to display the record after the click.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
Original Message:
Sent: 01-15-2020 15:42
From: Howard Fu
Subject: API copy a record and change some fields
Hi Mark,
I want to land the user in a newly created record where they don't have to make any changes.
------------------------------
Howard Fu
Original Message:
Sent: 01-15-2020 15:36
From: Mark Shnier (YQC)
Subject: API copy a record and change some fields
Did you want to be sitting on a record and pop up a duplicate of a record in Add mode waiting fir the user to complete certain fields, but with most fields carried forward, it did you actually want to create the record and land the user in the new record?
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
Original Message:
Sent: 01-15-2020 15:05
From: Howard Fu
Subject: API copy a record and change some fields
Hello QB Community,
How do I use API to copy a record in the same table and change a couple of values in the newly created record.
------------------------------
Howard Fu
------------------------------