Search and replace specific strings in apps

Good morning

My case is the following : I need to duplicate APP A (custumer A) to create APP B (custumer B).

The only difference between A and B :

  • Logo URL used in many rich text fields and email forms
  • Hardcoded email address used in A (used for notification in some forms)

Is there a way to search and replace URL A by URL B and email address by email address B.

Few months ago i used to use this command https://api.knack.com/v1/applications/$appID to get the structure of it, but it does not to work anymore (Internal Server Error).

Thank you for tips and advices, sorry if this questions has already been asked.

Francois

Hello Francois,

Replace “$appID” from url with your “APP ID” it’s I checked this url works perfectly. If this works for you otherwise in knack we have a formula field to replace the character.

Regards,
Sunny Singla
ssingla1985@gmail.com

Thanks Sunny

It works now.
Do you you know if there is a way to search and replace a string directly in the app structure ?

Hello Francois,

Yes, we can use replace function, also there is regexReplace available in knack.

Thanks,
Sunny Singla

Thanks Sunny
I think I wa not clear enough, sorry about this.

I am indeed looking for a way to replace a hardcoded field (email for example) for the whole app without having to update it in all forms and tasks. For example search all fields containing abc@iop.com and replace it by tyu@klm.com

Hello Francois,

Understand, I think this is only possible using javascript to scan the whole schema.

Regards,
Sunny Singla

1 Like