Support

Account

Home Forums ACF PRO Migrating Data from Text field to Post Object

Unread

Migrating Data from Text field to Post Object

  • I thought I would get some feedback on tackling my latest challenge from the group.

    Current setup: Repeater field with 5 fields. The target field client_name is a text field.

    There is a separate post type that contains all of the clients names and contact information.

    Currently you can type in the name of the client and no magic.

    The Future:

    I want to be able to search for clients by name, so I am thinking Post Object.

    Concern:
    This field totally slipped my mind and had I thought about it before going live with the application I would have done this. Now there are a couple hundred repeater rows that will be affected.

    So my thought is to create a new field in the Repeater for the post object and write a function that will look at each row and find the matching Post Object from the Client List and store the record ID in the new field. After looking at each and making sure the date is good, delete the existing text field.

    Trouble is that I know there are records where spelling might be off, apostrophes should be in a name and are not, etc.

    I appreciate any input you may have.

    Okay … discuss.

Viewing 1 post (of 1 total)

The topic ‘Migrating Data from Text field to Post Object’ is closed to new replies.