cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thansson
Helper IV
Helper IV

IF function in my fill option

Hi  I have a IF function in my fill option, in a gallery. The title field will change color if all checkboxes in an other gallery is true.

 

This is working fine, but if there are many rows (above 25) with the checkbox = true, it dosn't work anymore.

 

If(IsBlank(LookUp(SAP_Import;Unik=ThisItem.Title && CheckBox));White; If(IsBlank(LookUp(SAP_Import;Unik=ThisItem.Title && !CheckBox));Green;Yellow))

 

Is there a work around to solve this ?

 

Regards

 

Tony

1 ACCEPTED SOLUTION

Accepted Solutions

@Thansson ,

I cannot see your data, so can only follow the values you posted. Put two labels in the gallery with this

IsBlank(
   LookUp(
      SAP_Import;
      Unik=ThisItem.Title
   ).Unik
)

and this

IsBlank(
    LookUp(
      SAP_Import;
      !Checkbox
   ).Unik
)

These will return true or false.

  • If the first is true, the colour you are setting is White,
  • If the first is false and the second is true, you are setting Green
  • If they are both false, you are setting Yellow

If you do not get the result you are expecting, have a look at your logic.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

12 REPLIES 12
WarrenBelz
Super User
Super User

Hi @Thansson ,

I am not sure of your exact requirements here, but try this

If(
   IsBlank(
      LookUp(
         SAP_Import;
         Unik=ThisItem.Title
      )
   );
   White;
   If(
      CheckBox.Value;
      Green;
      Yellow
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thansson
Helper IV
Helper IV

HI @WarrenBelz 

 

Thank you for your answer.  This is not working for me.

 

I need to lookup selected "Unik" in a SharePoint list, if all checkboxes for this selected "Unik" are true, then the field should turn green. If only one checkbox is true, then it should be Yellow, if no checkboxes are selected, then it should stay white.

@Thansson .

What do you mean by "all checkboxes" - you have only mentioned one field Unik

@WarrenBelz 

 

Hi

 

The title field in a gallery is supposed to be colored, depending on a SharePoint list.

 

The SharePoint list is connected to an other gallery, with checkboxes.

 

Title is the same as unik in the sharpointlist, so if all checkboxes belonging to "unik" (or selected "Title"), the color of the title field should change color.

 

UNIK      Column1     Column2      Checkbox

111                                                      True

111                                                      True

111                                                      False

222                                                      True

222    

 

This command is working, but nut if the there is have more than 25 rows, belonging to the unik value

 

If(IsBlank(LookUp(SAP_Import;Unik=ThisItem.Title && CheckBox));White; If(IsBlank(LookUp(SAP_Import;Unik=ThisItem.Title && !CheckBox));Green;Yellow))

 

                                     

Hi @Thansson ,

Probably something like this

If(
   IsBlank(
      LookUp(
         SAP_Import;
         Unik=ThisItem.Title
      ).Unik
   );
   White;
   If(
      IsBlank(
         LookUp(
            SAP_Import;
            !Checkbox
         ).Unik
      );
      Green;
      Yellow
   )
)

Bear in mind that this is not Delegable, so how many rows are in your table?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @WarrenBelz   Thank you

 

Number of rows changes everyday from 2000 to 3000 rows, can I use another way?

 

How come it is not Delegable ?   

 

Here is a list of non delegable:

First, FirstN, Last, LastN
Choices
Concat
Collect, ClearCollect
CountIf, RemoveIf, UpdateIf
GroupBy, Ungroup

Hi @Thansson ,

The non-Delegable list is actually bigger than that (see my blog on this subject), but you could try this

With(
   {
      wUnik:
      LookUp(
         SAP_Import;
         Unik=ThisItem.Title
      ).Unik;
      wCheck:
      LookUp(
         SAP_Import;
         !Checkbox
      ).Unik
   };
   If(
      IsBlank(wUnik);
      White;
      IsBlank(wCheck);
      Green;
      Yellow
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @WarrenBelz 

 

All the fields becomes yellow, but the warning sign disappear.

 

So it must be in the right direction.

@Thansson ,

I cannot see your data, so can only follow the values you posted. Put two labels in the gallery with this

IsBlank(
   LookUp(
      SAP_Import;
      Unik=ThisItem.Title
   ).Unik
)

and this

IsBlank(
    LookUp(
      SAP_Import;
      !Checkbox
   ).Unik
)

These will return true or false.

  • If the first is true, the colour you are setting is White,
  • If the first is false and the second is true, you are setting Green
  • If they are both false, you are setting Yellow

If you do not get the result you are expecting, have a look at your logic.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,458)