Skip to main content
Inspiring
Jan 26, 2024 9:25 AM UTC
Solved

Mapping Composite Key from API to Record type

I'm working with data via API that uses composite keys and need to store the data in Record type. However, I understand that composite keys are not supported in record types. Could anyone suggest a way to handle this situation or provide any workarounds?

stefanhelzle0001
Brainy
Jan 26, 2024 10:45 AM UTC

I do not understand why you could not concatenate a date field ?!?

I was not talking about a custom record field, but about a normal text field in the database to hold that merged key. Then this can act as PK in the DB and in the record.

7 replies

stefanhelzle0001
Brainy
Jan 26, 2024 10:18 AM UTC

Did you consider to just concatenate the key values into a single text field? Maybe in addition to the original fields which then will not be used as keys anymore.

Inspiring
Jan 26, 2024 10:36 AM UTC

I could not concatenate the key values since one of them has date datatype, but I tried to create a random field to have it as ID and then to leave it as primary, but we are reading data from a web service therefore we couldn't sync a record type without having initially a unique primary key, so even if I create a custom field I could not mark it as primary

stefanhelzle0001
Brainy
Jan 26, 2024 10:45 AM UTC

I do not understand why you could not concatenate a date field ?!?

I was not talking about a custom record field, but about a normal text field in the database to hold that merged key. Then this can act as PK in the DB and in the record.

mathieud0001
Genius
Jan 26, 2024 12:12 PM UTC

Concatenated key is the only way to do it.

Inspiring
Jan 26, 2024 12:16 PM UTC

thanks