Skip to main content

Split String Derived Field

Intro

In a web app, a Split String Derived Field is like a tool that helps you chop up a piece of text into smaller parts using a special marker, like a comma or space. This tool is handy for sorting and changing data by making new sections from the original text. It makes the information in the app more organized and easy to understand.

1. Add Collection Data

In your collection add new records for data.

DrapCode Builder Collection Field

2. Create Derived Fields

Click Configuration in your collection and choose the Derived Fields option from the top menu. Then name your derived field, in Select Method Type choose Split String, select the field such as name, select separator such as colon, at last, in Select Item Position choose whether its first, last, second or any number, as per the use case.

DrapCode Builder Collection Field

2.1 Choosing the Nth Position

When you have to choose a field position other than first and last, say, the Nth position, the process remains the same, as in - name your derived field, in Select Method Type choose Split String, select the field such as name, select separator such as colon, in Value of N choose its exact position in number such as 2,4 etc. and in Select Item Position choose whether its 2nd, 4th, etc. as per the use case.

DrapCode Builder Collection Field

3. Drop a Component

Go to Pages an drop a Components to display your data. Let's say, Data Table.

DrapCode Builder Collection Field

4. Bind Collection to Component

Open the Settings of the component and choose the collection to bind to it.

DrapCode Builder Collection Field

5. Select Column Field in Data Table

To organize data in the Data Table simply choose the column and in its Settings select the column field which is first, last, second or fourth as per your use case.

DrapCode Builder Collection Field

6. Preview Data

Click Preview/Publish to view the field value that is getting split.

DrapCode Builder Collection Field

Conclusion

One major benefit of using a Split String Derived Field in a web app is that it facilitates better data organization, making it easier to analyze and manipulate information. By breaking down a text into smaller parts, you can create more structured and meaningful data, leading to improved clarity and efficiency in handling and presenting information within the application.