Help

Substitute in string with quote marks

Topic Labels: Formulas
860 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniela_Hecht
6 - Interface Innovator
6 - Interface Innovator

Hello Community, I’m having an issue with a substitute function I hope you ban help with.
I need to substitute certain numbers in a string that includes quote marks, and I get errors or invalid formulas in every try
This is my original string, I have it in a separate field called _bto _data

a:2:{i:1595610800;a:29:{s:10:“query_type”;s:12:“category_ids”;s:21:“assigned_category_ids”;a:1:{i:0;i:227;}s:14:“selection_mode”;s:9:“dropdowns”;s:10:“default_id”;s:4:“2615”;s:5:“title”;s:26:“Elige la base de tu Anillo”;s:11:“description”;s:97:“Selecciona una de las opciones de la lista con el metal, talla y piedras secundarias que deseas. “;s:12:“thumbnail_id”;s:0:””;s:12:“quantity_min”;i:1;s:12:“quantity_max”;i:1;s:8:“discount”;s:0:"";s:19:“priced_individually”;s:3:“yes”;s:20:“shipped_individually”;s:2:“no”;s:8:“optional”;s:2:“no”;s:14:“display_prices”;s:8:“absolute”;s:13:“select_action”;s:4:“view”;s:18:“hide_product_title”;s:2:“no”;s:24:“hide_product_description”;s:3:“yes”;s:22:“hide_product_thumbnail”;s:3:“yes”;s:18:“hide_product_price”;s:2:“no”;s:21:“hide_subtotal_product”;s:2:“no”;s:18:“hide_subtotal_cart”;s:2:“no”;s:20:“hide_subtotal_orders”;s:2:“no”;s:12:“show_orderby”;s:2:“no”;s:12:“show_filters”;s:3:“yes”;s:17:“attribute_filters”;a:2:{i:0;i:1;i:1;i:3;}s:8:“position”;i:0;s:12:“component_id”;s:10:“1595610800”;s:12:“composite_id”;i:4844;s:16:“pagination_style”;s:7:“classic”;}i:1595610801;a:28:{s:10:“query_type”;s:12:“category_ids”;s:21:“assigned_category_ids”;a:1:{i:0;i:341;}s:14:“selection_mode”;s:6:“radios”;s:10:“default_id”;s:0:"";s:5:“title”;s:28:“Elige las Gemas de tu Anillo”;s:11:“description”;s:55:“Selecciona la combinación de piedras de tu preferencia”;s:12:“thumbnail_id”;s:0:"";s:12:“quantity_min”;i:1;s:12:“quantity_max”;i:1;s:8:“discount”;s:0:"";s:19:“priced_individually”;s:3:“yes”;s:20:“shipped_individually”;s:2:“no”;s:8:“optional”;s:2:“no”;s:14:“display_prices”;s:8:“absolute”;s:13:“select_action”;s:4:“view”;s:18:“hide_product_title”;s:2:“no”;s:24:“hide_product_description”;s:3:“yes”;s:22:“hide_product_thumbnail”;s:3:“yes”;s:18:“hide_product_price”;s:2:“no”;s:21:“hide_subtotal_product”;s:2:“no”;s:18:“hide_subtotal_cart”;s:2:“no”;s:20:“hide_subtotal_orders”;s:2:“no”;s:12:“show_orderby”;s:2:“no”;s:12:“show_filters”;s:2:“no”;s:8:“position”;i:1;s:12:“component_id”;s:10:“1595610801”;s:12:“composite_id”;i:4844;s:16:“pagination_style”;s:7:“classic”;}}

In it I need to replace values “227”, “1641”, and “174” with values in fields {Id bases personalizado}, {ID Personalizado} and {ID piedras personalizado} respectively, so I have this formula in my destination field:

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE({_bto _data},“227”,{Id bases personalizado}),“1641”,{ID Personalizado}),“174”,{ID piedras personalizado})

I am guessing the issue is with quote marks, but I don’t even know for sure, I’ve tried changing “227” for ‘227’ and just 227, but none work, and I can’t change the marks in the original string because I need the output to have them just like in the original. I checked for smart/dumb quotes but it didn’t solve the problem

Can anyone tell me please what I’m doing wrong?

0 Replies 0