Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.

Replacing multiple unique operators in one text field (LongText) with values from another table

HI

  1. Table 1 - contains a list of unique text operators with a field that contains the name of the column in Table 3.
  2. The long text field in Table 2 - contains text in which unique operators from Table 1 are inserted in any order, plus operators can be repeated and the text can consist of only one operator (For example: Any text value {special operator # 1}, more some text {special operator # 27} and so on again the text {special operator # 1}).
  3. Table 3 - A set of columns with values โ€‹โ€‹to be returned and replaced in the original text of Table 2, matching with unique operators of Table 1.

My attempts to find a solution resulted in the return of only one value from Table 3, and there can be as many operators and corresponding values as you like in the text box with operators in Table 2.
I ask for help, is it possible to do this in another way?)

0 6 284
6 REPLIES 6

Seems to me that you can do it using grouped actions wherein you loop through your list. It is not trivial though. @Steve is an expert at this and he has a sample app in the tips and tricks section.

Do you mean to do a repetitive action with the contents of the long text field until the unique operators in this text are over, making the replacement operator with the desired value at each iteration?
This will also lead to a multiple of data synchronization. I have 9 such fields in one row of Table 2, if we assume at least 2 replacements per field, then there will be 18 changes per row of Table 2, and there can be 200-300 of these rows on average at the same time, i.e. these are thousands of changes, in my opinion there will be a heavy load on the device (mostly desktop).
Maybe there is a way to do 1 change / sync string = 18 ID changes?
Is it hypothetically real?

Yes, it is going to be slow if youโ€™re talking about so many replacements. You could consider alternatives such as spreadsheet formulas or scripting.

Yes, I know how to do it on the other side, but I would like to implement it using standard AppSheet expressions.
Can make a virtual column with a list of all unique identifiers corresponding to a given string + enter a sort order for each identifier and return the list of corresponding values from Table 3 to another virtual column for each identifier in the same order?
Are there other options for implementing such a task?

I am not aware of any other way as itโ€™s difficult to handle lists and complex data structures in pure AppSheet currently. Maybe someone else has a clue.

Thank you for your attention to me. Iโ€™ll think about what other way to do it.

Top Labels in this Space