Column Type: 'Copy Value'

Summary: Column type that would copy a value instead of referencing it

All column types in Glide are a reference to an another value somewhere in the sheets. If the source cell changes it updates across all other cells/columns accordingly.

How about the ability to ‘copy’ the value at the time new row was added. So that if the value changes in the future it won’t affect the copied version?

‘Like’ if you think this would be useful for your apps!

4 Likes

You should add this to the Feature Request app.

1 Like

Thanks, have added it to the list.

2 Likes

+1

@Rogelio If in your use case you wish to initialize the value of an attribute (column) so that upon creation of an item (row) the attribute has a fixed value (always the same upon creation), then you can achieve this by doing the following:

  1. In the data editor, create a date/time column. You can call it “Creation date” (for instance).
  2. Populate this column with the special value called “Current date/time”. Do this in the “Add” section when adding an item.
  3. In the data editor, create an “If Then Else” column. In the setting of this column, indicate your “Initializing value” if your “Creation date” is not empty.

Your feature request is different to what I describe, but close enough that this might still be helpful to you.

image

3 Likes

Thanks for your suggestion :slight_smile: Although doesn’t address my need.

In my case a user updates their dining preferences (‘Pick-up’ or ‘Dine-in’ in their User profile) before submitting an Order. When the new order is submitted the dining preference needs to be copied to the new Order as it could potentially change every time the user submits a new order.

If I’m understanding, you want to save the last dining preference to the user profile to use for a new order? This could probably be done. You would need to create a relation from the user profile to the orders. Then create a rollup column to get the latest date from the relation. Then create a template of user email and date in one column. Also do the same template in the orders sheet. Next create a relation form the template in the user profile to the template in the orders sheet. Finally create a lookup of the last selected delivery preference from the user’s list of orders. This you can use however you were using it before.

Not quiet correct, so this is the workflow:

  1. User updates Dining Preferences = Pick-up or Dine-in in their User record
  2. Display menu when Dining Preference is not empty
  3. User adds items to cart and processes payment
  4. Through the use of a script items for the same order are identified from App: Sales (Paid at column, which is unique every time the cart payment is processed)
  5. Script then copies Dining Preferences from User profile to the Order and resets the values (forcing the user to confirm Dining Preferences at the start of every order to view menu again)

If I simply reference the Dining Preference to the Order, every time the user updates their preference it would update for ALL orders, which is not the desired behaviour, hence where the Column Type: Copy Value request came from.

OK, now I get it. One thing you could do is create a template column on you menu items sheet that joins the description of the item and the user’s dining preference from the user profiles sheet. When adding to the cart, you would use this template column for the description instead of just the menu item description. This would make that dining preference choice permanent within the App: Sales sheet.

This wouldn’t solve the issue of clearing out the dining preference once the order is completed. You would still need a script for that, but at least your script wouldn’t be pulling the value from the user profiles sheet since it would already be part of the cart item description.

I do like your request though. I think that would be handy as there is the same issue within sheets which get frustrating sometimes.

Yeah I use the same approach for identifying the restaurant, by appending the id to the item description.

‘Copy Value’ feature would be very useful for sure!, and I would’ve thought not to complicated to implement :man_shrugging:

1 Like

this option is not more possible, looks like.
the initializing value doesnt exist anymore

Looks like it’s just text. You type in what you want.

Tomorrow I’ll send you my printscreen, because the If Then Tab I’ve is not like the one Nathan posted over here, I’ve only a big combo for the ‘Then’ and not ‘initializing value’ field.
Or, this, will appear only for specific cases?

Hi Jeff,
sorry for a late message, but im in Japan… and actually this is also another issue Ive to solve.
As you can see the IF THEN ELSE doesnt give me any chanche to populate another field, I can only populate the same If Then Else virtual field, but this will not help me to populate automatically a specific field of the Table.
Indeed, about my issue, the Today() date of Google sheet is located in US, that means Ill receive the new date only 12 hours later than my Today(). So I need to force it in such a way.
Did I missed something?

You can change your location settings in the Spreadsheet Settings.

I think you’re misunderstanding the purpose of the If > Then > Else column, it populates itself and does not populate other fields in the same table.

Ok for the date.
Yes I was looking to populate fields by default, I saw the above screen that it’s different than the one I have now, so I was thinking before was possible to populate other fields.

What do you want to be automatically populated? I think this can be done with a script.

Well Ive a different needs, one is to add a new record with info populated from another previous record and the other is to give a specific value to a specific field.
Yes you are definitly right, is possible to use the script… but I dont love this way so much.
If you have some example case well done Ill try to follow it.
thanks for the help, apprecciated. :+1:

Is it specifically the record just before that, or is it not following any constant rules?

one before. let say you have to add many redundant data and to make it easy you get the previous ones
but even a constant would be fine for many cases