Remove first characters in listview

Hi all,
I've tried to solve it for few days and gave up :slight_smile: Working on shopping list app in which products will be sorted. Based on category - products have labels like A1,A2 etc. to make sort easier in listview in last step. So I have listpickers with products lists and everytime something is picked - it shows in listview. Is it possible to remove first 4 characters in every line in listview so there will be e.g. "Grejfrut - 4 szt" instead of "A12 x Grejfrut - 4 szt". Tried with split, trim etc but nothing works in the way I would like to :slight_smile:
Hope someone will help.
Best regards,
Main window:

Unsorted list

Sorted list, want to get rid of A12,A11 etc.

Marek

What is the range of codes, are they all the same length or different lengths. For example:

A1 x
A11 x
A111 x

or

A001 x
A011 x
A111 x

The same lenght.
A11 x
A24 x
A19 x
Always 3 characters, then space, then "x"

OK, good, that helps. Give me a few minutes to provide an example.

Here is an example product item:
AX11 x Shoes

There are seven characters to be removed:

AX11 x Shoes
1234567

We use the text segment block to do this:

image

If we take our list of product items,

image

we can iterate over this list, to produce a new list without the codes. The indexes will be the same.

and we get our product listing without the codes

image

(note: there may be a cleverer way of doing this with the advanced list blocks...)

1 Like

Did you know a list can hold other lists as items?

That makes it possible to keep items of different lengths and types.

No way! It works! Thank you very much, I can now start alfa tests with my wife xD

Did you know a list can hold other lists as items?
That makes it possible to keep items of different lengths and types.> Blockquote

@ABG - Yes I did - thank you :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.