How to Implement Palindrome Concept in OutSystem?

Lets say, we have inputs of any data type either Integer Numbers or Text. And we are asked to check whether given input parameter is palindrome or not? 

How to implement this in OutSystem?

Any hint?

Solution

Hello @Abhinav Shilwant,

You definitely have options, like the one Ellakkiya has suggested. 

Another option is to use the string Reverse function available in the String Utils forge component.

You can match the input string with the reversed string returnedby this function to check if the input is a Palindrome.

Regards,

AJ

Solution

Hi Abhinav Shilwant,

You can use the Javascript widget to achieve this

Step1 : Create Js 

Step 2 : Pass the Value to the  input of the Js

Step 3: Use If condition

Check whether the typed value and the reversed value are equal.

Step 4: If it matches, then it is palindrome.

Hope it helps!

Regards,

Ellakkiya.S

Solution

Hello @Abhinav Shilwant,

You definitely have options, like the one Ellakkiya has suggested. 

Another option is to use the string Reverse function available in the String Utils forge component.

You can match the input string with the reversed string returnedby this function to check if the input is a Palindrome.

Regards,

AJ

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.