enclosed in if iteration

hello,

okay so what I want to do if show specific icons based on if a string value is in my aggregate or not, I've done my if statement using enclose if and gave it the icons for whether it satisfies the condition or not but im not sure how to make it iterate through the aggregate.

Thanks!

Hi Johara,

Please let me know where  you are using this if widget for icon like table record or list record or other place,

if you are using table or list record when you put if condition on first row it will automatically iterate.


Regrads

Rahul Sahu

Hi johara!

Do you want a specific icon to each row returned from the aggregate?

Regards

Graça  

Hey! 

To Iterate a List use For Each

This example looks for a user named Mary, once it finds 1 it preserves the True value thanks to the 'OR' 

Use FoundString in the IF where you show the Icons

If the app is not reactive use Ajax Refresh on the IF widget 


Hope it helps :)

Maria da Graça Peixoto wrote:

Hi johara!

Do you want a specific icon to each row returned from the aggregate?

Regards

Graça  


His Maria! 

I have my icon in a enclosed in if widget and what I'm trying to do is iterate through my aggregate to look for a specific string if it is there I want the if statement to show the icon

Hi Johara,

Can you provide some images or oml.


regards

Rahul Sahu

johara khalid wrote:

Maria da Graça Peixoto wrote:

Hi johara!

Do you want a specific icon to each row returned from the aggregate?

Regards

Graça  


His Maria! 

I have my icon in a enclosed in if widget and what I'm trying to do is iterate through my aggregate to look for a specific string if it is there I want the if statement to show the icon

The post I made with the screenshot shows exactly how to do this


Filipe Silva wrote:

Hey! 

To Iterate a List use For Each

This example looks for a user named Mary, once it finds 1 it preserves the True value thanks to the 'OR' 

Use FoundString in the IF where you show the Icons

If the app is not reactive use Ajax Refresh on the IF widget 


Hope it helps :)

I am following your steps it wont let me use the or operator it give me this error "can't apply 'or' operator to 'text' together with 'boolean'. 

and do you mind elaborating on what you mean by "Use FoundString in the IF where you show the Icons" do i use the variable in place of where I would out in my string value?



johara khalid wrote:

Filipe Silva wrote:

Hey! 

To Iterate a List use For Each

This example looks for a user named Mary, once it finds 1 it preserves the True value thanks to the 'OR' 

Use FoundString in the IF where you show the Icons

If the app is not reactive use Ajax Refresh on the IF widget 


Hope it helps :)

I am following your steps it wont let me use the or operator it give me this error "can't apply 'or' operator to 'text' together with 'boolean'. 

and do you mind elaborating on what you mean by "Use FoundString in the IF where you show the Icons" do i use the variable in place of where I would out in my string value?



FoundString is the boolean variable I created, use this variable as the condition in your IF

Check the assignment, Users.Name = "Mary" is a True/False expression that's why it works with the 'or',

what the assign does is: 

FoundString or Users.Name = "Mary" 

    boolean    or   Boolean_expression 


You are trying to find a specific string in an element of your aggregate's output right?

so you are doing something like Users.Name = "Mary" to verify if the string is there, this will be either True or False