Jump to content
  • 0

Will changing "Field for Value" in lookup table convert existing table data?


roattw

Question

Will changing "Field for Value" in lookup table convert existing table data or just new records entered from that point of the change forward?

App data page form that asks for "Hospital" name via dropdown lookup table from a table of Hospitals.

That table has the full name and abbreviation.  Currently "field for value" is set for the full hospital name.

If I change that to now be "abbreviation" (Abbrev) will the existing values already entered with the full hospital name won't convert correct?  Only new entries will use the change to abbreviations?

Thanks!

 

caspio-abbrev.png.ac7e151de88db3cd0ccd3e73ecde826e.png

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Only new entries will have the new values going forward. Old entries will stay the way they are. I believe the only time your old values are changed is if you change the datatype of the field at the table level. In example, if the field was previously set to text and is changed to number, all of the values with anything but numbers would be deleted.

If you want to change the old entries' values over to the ABBREV, you could either download the table, swap the values out manually, and re-import the table.

Or, the easy way imo, create a Task that will update the value of that field when ran. Just use an update block, select the field. Maybe do a JOIN with the table that has Hospital/Abbrev, and join on Hospital. Then, set value to Abbrev. That should set your older records to the correct hospital ABBREV.

Link to comment
Share on other sites

  • 0

I highly, highly recommend trying this out on a dummy table first. Best option would be to just duplicate the table you're updating and try it from there.

I believe there is a 10,000 record limit on tasks, and the count that Caspio does is sometimes confusing. If you have more than 10k records, you might need to add a new condition in your WHERE clause that limits the amount of records selected. Best way imo is to use the ID field/primary key and set it to 'WHERE ID is greater than or equal to 1' and another 'WHERE ID is less than or equal to 9999'. After you run it, change the values to '9999' and '19998', etc. 

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.

Guest
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.

Loading...
×
×
  • Create New...