Solved

Can't connect a tableRecord in to another table

  • 18 August 2020
  • 2 replies
  • 319 views

Userlevel 5


I'm trying to create a new table record using a field which is a connected record from another database. Using the GUI I can create and connect table record with no issues. But, when I run using the Graphiql Explorer I got the following message: Value You don't have permission to connect these cards/table records. Both databases has the Public Permission checked.
 I tried using the API (new version) and presents the same problem.

icon

Best answer by Mayara Rasini 18 August 2020, 21:21

View original

2 replies

Hello! :grinning:
You need to use the record ID when handling connections. For example, to update a connection field in another table:

mutation{
  setTableRecordFieldValue(input:{
    table_record_id:369553512 #ID_from_parent_table
    field_id:"connection_field"
    value: 370702260 #ID_from_connected_record
  }) {
    clientMutationId
  }
}

You can take the record ID on the url or the ID field :)

 

Userlevel 7
Badge +8

I know this topic is old, but how does it work if I want more than one connected record? If I use the solution above by @Mayara Rasini , all records that are already connected get removed.

If I use something like

mutation{
setTableRecordFieldValue(input:{
table_record_id:369553512 #ID_from_parent_table
field_id:"connection_field"
value: [370702260, 370702261] #IDs_from_connected_record
}) {
clientMutationId
}
}

I get an “Invalid input” error.

Reply