How will you achieve below pattern in Outsystems?


*

* * 

* * *

* * * *



Hi,

I don't know the context, but if you place inside a block 4 containers with fill in the width property, left align in all of them and place the * that you need inside that containers you will have that pattern.


Can you give us more context about what you need? it's easier to give you a best solution.


Best regards,

Ricardo M Pereira

Ricardo Pereira wrote:

Hi,

I don't know the context, but if you place inside a block 4 containers with fill in the width property, left align in all of them and place the * that you need inside that containers you will have that pattern.


Can you give us more context about what you need? it's easier to give you a best solution.


Best regards,

Ricardo M Pereira


Its just for the logic purpose likein any other programming language you can do it e.g.


 int i, j, rows;
   printf("Enter the number of rows: ");
   scanf("%d", &rows);
   for (i = 1; i <= rows; ++i) {
      for (j = 1; j <= i; ++j) {
         printf("* ");
      }
      printf("\n");
   }

- I will use a JS Snippet & just display the result

You already provided the answer.


Hi Afaque, What is the need here? Like Ricardo said, you can do this with couple of containers. Even you can create a webblock with those containers and use the pattern dynamically when required.



assif_tiger wrote:

- I will use a JS Snippet & just display the result

You already provided the answer.


No Bro ,want to achieve this without using JS code.

Processing Upload...

Hi Afaque,

Check this sample app, I think it was easy to develop the sample instead of writing it in words to explain the logic so PFA sample. Power of OutSystems :)

It is a reactive sample, same logic can be implemented in traditional also.

Hey,

I did it with action & dynamic
https://assif.outsystemscloud.com/MainModule/StarPattern.aspx


- Pure OS Actions - NO any JS
- Expression
- Some Variables
- Two if - acting like a Outer & inner Loop

assif_tiger wrote:

Hey,

I did it with action & dynamic
https://assif.outsystemscloud.com/MainModule/StarPattern.aspx


- Pure OS Actions - NO any JS
- Expression
- Some Variables
- Two if - acting like a Outer & inner Loop

Cool!! Can you plz share OML with me?


Solution

Hi Afaque Shaikh,

Check this: Pattern Task


PFA - includes the .oml solution


Hope this helps you!


Regards,

Benjith Sam

assif_tiger wrote:

Yep.
here it is :)

Thank You!


Benjith Sam wrote:

Hi Afaque Shaikh,

Check this: Pattern Task


PFA - includes the .oml solution


Hope this helps you!


Regards,

Benjith Sam


I appreciate your help, Thank you!! 

Nikhil Gaur wrote:

Hi Afaque,

Check this sample app, I think it was easy to develop the sample instead of writing it in words to explain the logic so PFA sample. Power of OutSystems :)

It is a reactive sample, same logic can be implemented in traditional also.


I appreciate your help, Thank you!! 

Thanks, Afaque
That was an interesting question :)