Jump to content
  • 0

Changing data type in order to create a relationship



I have two table that I'd like to relate.  Each table has a column called person_ID that match up and normally could provide a parent-child relation.  However,  the one table the person_ID datatype is text (255), while in the other table the person_ID datatype is "ID".

I can go into the design of the table and change the datatype to Autonumber which changes the datatype from text (255) to ID, and that allows me to relate the two tables.  This seems problematic though, and so I wonder if there are other ways to go about this solving this challenge.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi telepet,

The main requirements for establishing database table relationships in Caspio are as follows:

  1. The data types for each field (parent and child) must be compatible. Please see the link: http://howto.caspio.com/tables-and-views/data-types/
  2. One of the fields participating in the relationship, preferably the Person_ID on the parent side, must be a unique field (i.e. an AutoNumber or Prefixed AutoNumber field, or a field that has the Unique checkbox checked). Please read this How-To article: http://howto.caspio.com/tables-and-views/relationships/

As of now, I could not see any reason why changing to an AutoNumber (ID) date type is problematic for your use case. Please provide some examples of how the Person_ID field value should look like, e.g. a prefixed one like "PRS_10101" or something else. That way, we can see if workarounds are available.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...