36
Views
14
Comments
Solved
I want to create a list of the alphabet.
Application Type
Traditional Web

I'm a beginner in Outsystems. Could someone help me? Do I need to use ListAppend 26 times to create a list of the alphabet? Is there a smarter or easier way to do this? 

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

I wouldn't do something as expensive as a static entity for this. 

2 options that are compact

  • ListAppendAll

  • String_Split


Dorine

UserImage.jpg
Shin S

Thank you! I'll try your method 

UserImage.jpg
Shin S

Thank you. Thanks to you, the issue has been resolved. 

2023-05-16 06-18-07
Aalhad Rangnekar

Hi Shin,

For reusability you could consider storing each alphabet record in a static entity called alphabets that you would then pull in your screen preparation as a list. This would circumvent you having to ListAppend individual records.

UserImage.jpg
Shin S

I don't plan to reuse it, but do I still need to create a static entity to achieve this? Sorry for being demanding. Does creating a list mean I have to repeat listappend 26 times? 

2023-05-16 06-18-07
Aalhad Rangnekar

If its in an entity, you can just assign the output of the aggregate as a list of alphabets rather than having to ListAppend 26 times. You could also use Javascript to build an alphabet list and assign the output list to your local variable list.

2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi,

Can you please, let me know you are storing data in DB by doing list append or you are displaying some where in the screen?


Regards,

Rajat

UserImage.jpg
Shin S

 I just want to assign values like A→B→C when the values in another list match a condition. 

I want to replace the sequence with letters of the alphabet. 

UserImage.jpg
Shin S

Actually, I will use both. I will display it on the screen, and then insert it into the database. 

2024-07-09 06-45-01
Adarsh

Hi @Shin S 

you don't need to use ListAppend 26 times to create a list of the alphabet in Outsystems. You can simplify the process using a loop or by converting the character codes to their corresponding letters.

Here's one approach using a loop:

  1. Create a list of strings to hold the alphabet.
  2. Use a For Each loop to iterate through the ASCII codes for letters 'A' to 'Z' (which range from 65 to 90 for uppercase, or 97 to 122 for lowercase).
  3. Convert the ASCII codes to characters and append each character to the list.

In Outsystems, you can achieve this using the Chr() function to convert ASCII values to characters inside a loop. This will allow you to populate the list of the alphabet without appending each letter manually. 


Please mention if you need anything specific,

UserImage.jpg
Shin S

Thank you! I'll try your method 

UserImage.jpg
Shin S

Thank you. Thanks to you, the issue has been resolved. 

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

I wouldn't do something as expensive as a static entity for this. 

2 options that are compact

  • ListAppendAll

  • String_Split


Dorine

UserImage.jpg
Shin S

Thank you! I'll try your method 

UserImage.jpg
Shin S

Thank you. Thanks to you, the issue has been resolved. 

2019-01-07 16-04-16
Siya
 
MVP

Since you asked for a 'smarter or easier way,' I would recommend the String_Split method suggested by @Dorine Boudry  as the perfect solution.

If you need a String_Split on the client side please see this discussion for a solution as there is no direct method available and has to be done in JavaScript ( refer the comment by @Stefan Weber). 

UserImage.jpg
Shin S

Thank you! Please wait a moment. I will try all the experts' methods and find the best one that suits my situation. 

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