Long text substitution

Hi All,

I have a long text field where the user basically writes down a list of tasks. Each line is a task
When the user completes a task, he simply adds “**” at the beginning of the task.

On an another hidden long text field I would like to keep only the remaining tasks (basically a copy of the source text field without any lines that start with “**”

Basically, I am trying to erase text that is between “**” (included) and a line break.

Any idea on how I can achieve that?

Thanks!

0 7 390
7 REPLIES 7

There are many other ways to accomplish this and the method you have chosen is a bit cumbersome and messy. Why don’t you reference your Tasks table to your Users table and have some kinda [Status] column there which is an ENUM, displayed as buttons and a quick edit field in the Detail View of the task so that your user can easily click the button and set the task as Completed and in the inline view you can filter out the tasks that have been completed.



Thank you @LeventK

I agree but I did not share everything. I have a class builder where a coach can select exercises he wants to add in the class. The process of selecting each exercise can be long especially when the exercise library is large. Also, coaches like to write down the class structure and exercises on paper or digital notepad before creating it on the app. That’s why I was thinking of a smart way to capture a long text, parse it and have the system suggest the exercises to be added to save time. Today’s parsing is simply done by taking the long text and putting each word in a list. Each exercise in the library is compared to this list via the function INTERSECT() to identify matching word. That works great but the suggested list can be quiet large so I would like to give the user the ability to just check out the exercises that was already mapped by adding “**” Preformatted text" as a prefix. That’s why I would like to manipulate the long text field to remove lines that have been already mapped.

As your coaches writes everything to paper first, why don’t you benefit from OCRTEXT() functionality to create those exercise records directly from their written draft right into the app?

Yes! That’s the plan but I want to have the option for digital note first.

Is it possible to build an expression that strip away line of text that is between “**” and a line break? I want to do that dynamically via a virtual long text.

Hi All,

Does anyone have an idea on this?

Have the current long text value:
“**Jumping jack
**Squat
Plank
Push-up
Sit-up”

I would like this calculated value in the other long text field (stripping away lines that start with ‘**’:
“Plank
Push-up
Sit-up”

How can I obtain that using the available appsheet functions?

Thanks!

I don’t think you’ll find an easy way to do it. I also suggest you consider better ways to approach you data organization than text manipulation. AppSheet is particularly weak at text manipulation.

Thanks Steve. I am going to leave this topic open. Maybe a solution will come up in the future.

Top Labels in this Space