New! GraphQL.NET Cookbook by Senthil Kumar Balu

How to find if string contains another string in Outsystems ?

There are times when you want to check if a string exists in another string when working with the OutSystems application. In C# , we have the method string.Contains which does the similar task easily.

How to find if string contains another string in Outsystems ?

You can use the Built-in Text function called “Index” to find out if one string is contained in another.

This function returns the position of the string keyword that is found in another string. If the string is not found , it returns -1.

If you need to get the same behaviour as the String.Contains , then you can use the below code.

Index(<string>,<keyword to search>) > -1

Eg :

Index("Welcome to DeveloperPublish.com","to") > -1
Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.