Skip to main content
Question

API Add_Record using URL Alternative and Field NAMEs rather than ID

  • September 27, 2019
  • 0 replies
  • 84 views

Hello,

Usually, I post new records via API using field IDs. For a new specific case, I have to use Field NAMES. 

I see in the API documentation that this is supposed to be possible in theory. But in application, it does not seem to work. A new record will be posted  but all the fields come out blank.

Does anyone have the same problem?

https://target_domain/db/target_dbid?a=API_AddRecord&_fnm_second_year=1776
&_fid_8=changed&ticket=auth_ticket&apptoken=app_token


From API guide
"

Using field IDs and field names

When specifying fields, you can use either field IDs (fids) or field names. Field names are nearly identical to field labels; if you know the field label, you can determine the field name by converting all characters to lowercase and replacing all non-alphanumeric characters (including spaces) with an underscore.

For example, for a field with this label...

Event Name

...you should use this field name:

event_name

You can use a mixture of fids and field names in the same API call.

  • To obtain a field name, first determine the field's label (using API_GetSchema, or by viewing the field in the Quick Base application UI.) You can derive the field name by replacing uppercase characters with lowercase characters and using underscores instead of all non-alphanumeric characters.

  • To obtain a fid, use API_GetSchema. If you are an application manager, you can also obtain the fid using the Quick Base UI by customizing field properties."

    https://help.quickbase.com/api-guide/add_record.html


------------------------------
Manny Hernandez
------------------------------
This topic has been closed for replies.

EverettPatterso
Forum|alt.badge.img+10
API_AddRecord works for me when using field names.

URLRoot() & "db/" & [_DBID_TABLENAME] & "?a=API_AddRecord&_fid_12=" & URLEncode ([Record ID#])& "&_fnm_text4=Test insert text&z=" & Rurl()​


There may be something wrong with the formula URL you are using, post the formula and field names.

------------------------------
Everett Patterson
------------------------------

  • Registered
  • September 30, 2019
Where did you see that using "fnm" instead of fid was the way to do it in the URL? I was unable to find information on that.

The only thing I see in the help doc you posted is that you can do this when you do an api call with XML. I don't see it mentioned that field name will work in the URL but I would be interested in figuring that one out too.

Why are you unable to use the field ID in this specific case? I'm just curious why that would be a limitation.