Duplicate field within Object

I would like to be able to copy a field to the same object and choose to include some or all field options such as validation or conditional rules.

For example, I have an app that has a lot of fields (150+ in one Object) and most of these are very similar to other fields in the Object. It would have saved me countless hours if it was possible to select one or more fields and create duplicates of them. Ideally, the duplication would also copy conditional rules and apply them to the newly duplicated field and correctly reference the other newly duplicated fields as targets within the conditional rules.

  1. In the Builder, in the relevant Object, in the Fields view, create a new button called "Actions", one of which is "Duplicate Fields".
  2. The User clicks on "Duplicate Fields".
  3. Checkboxes appear in the left-hand most part of the field boxes.
  4. The User selects the fields they want to duplicate and clicks "Duplicate" button at the bottom of the screen.
  5. A modal popup is displayed that gives the user some options about what to copy, for instance:
    a. Duplicate user data?
    b. Duplicate Conditional Rules?
    i. If Yes, are rules to be applied as absolute (keep referencing the original field) or relative (duplicate the fields and then reference the new fields in the conditional rules in the same manner as the original relationship)?
    c. How many times do you want to duplicate the fields?
  6. The User enters their prefered settings and clicks the "Duplicate" button.
  7. New fields are created with "Copy 1", "Copy 2", "Copy n" appended to the title of each.

Something like this should be possible:

@LindsayRob10468 is talking about copying fields in the builder - not copying records.

I confess it is not something that I have felt the need for that much except for perhaps variations of formula or conditional rule fields.

Thanks for sharing @LindsayRob10468! Appreciate you taking the time to explain your problem and an idea for what a solution could look like. Curious if you could expand on the use case or a similar real world example for the app setup you’re describing?

I would caution against having such a large number of fields that have conditional rules, as there may be performance implications (see Managing Your App’s Performance - Knack Knowledge Base) but I am sure there are valid use cases that present issues we would want to explore solutions for.


@knckusr - as @JulianKirkness pointed out, that feature you posted is a separate request. We currently allow one to Copy a Record Using Record Rules - Knack Knowledge Base but expanding that to Action Links is still on our list.

1 Like

Coming from Airtable, duplicating a field within a table was something that I did frequently, especially formula fields. If I was going to make a change to a formula field I would make a quick duplicate and test my changes there. This was one of the first things I felt was missing from Knack and was surprised it’s not there. Interesting to note that the column header popup alludes to this function. “Settings, Copy, &Delete” 4c50e8ce-cbe5-442b-80e6-927c8ca57832

It just occurred to me that there is currently a way to copy fields within an object!

We’ll see if we can expose this functionality in a more intuitive way - the tooltip you discovered @B11 certainly hints to the fact that this was planned at some point, and it’s an oversight that the text wasn’t updated. We’ll look into this from a full product update consideration.

In the meantime: here’s how you can copy fields in an object.

1 Like