cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Visible Based on Table

I have a gallery in which a label (RequiredItem) is visible based on validation. I would like an alert label on another page of the app to be visible if any items in the gallery have that label visible and the quantity (Orderquant) for that item in that gallery is empty/blank/0.

 

My current formula in the Visible property of the alert is:

 

If(And(RequiredItem.Visible=true,Orderquant.Text="0"),true,false)

 

I don't get any errors, but that label is visible for several items

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Visible Based on Table

Hi there,

 

My app is essentially a shopping cart for school supplies. Some users must purchase certain items depending on their campus and the course.

 

I used complex logic to make the "Quantity" text input for those items in the gallery pink, as well as to make a "Required Item!" label visible.

 

The items added to the shopping cart are added to a collection. I added a "Req" column to this collection, which would read whether the "Required Item!" label was visible (true or false).

 

Then I created CountIf to count how many required items should exist for each campus/course scenario, and on the checkout page, counted the rows that included "Req="true"". If the checkout count was less than the gallery count, there would be a "Missing Required Item!" label on the checkout page, and if that "Missing Require Item!" label was visible (true or false based on the "Req" comparison/counts), the "Submit Order" button would also be disabled.

 

So, it took a bit, but this has been resolved. 🙂

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Visible Based on Table

@Kat_YESPrep 


A few screenshots of what you are attempting to do would help us help you, I'm finding it a little hard to imagine your process ... although that could just be low caffeine intake lol

 

A few things you could try though:

1. Split your conditions and try them one by one to see if either is the problem

2. Because you are checking for empty/blank/0 ( I assume all are possibilities?) try converting your order quantity to a number by multiplying by 1, ie

... Value(Orderquant.Text)*1=0 ...

3. On transition to the other screen set a variable that 'alert' can reference 

Highlighted
Community Support
Community Support

Re: Visible Based on Table

HI @Kat_YESPrep ,

Do you want to display the alert label in another screen when the RequiredItem Label is visible and the quantity value for that item is Blank?

 

Based on the formula that you mentioned, I think there is something wrong with it. As an alternative solution, please consider take a try with the following workaround:

Please consider apply the validation formula of the RequiredItem Label to the Text property of the RequiredItem Label rather than the Visible property. Set the Text property of the RequiredItem Label to following:

If(
   ThisItem.ColumnName = .... && ....,    // type your validation formula here
   ThisItem.ColumnName2,                 // if the validation is true, display the RequiredItem value
   Blank()                    // if the validation is false, display empty
)

Note: If the RequiredItem Label displays the text value, means that the RequiredItem Label is visible.

 

Then within your another screen, set the Visible property of the alert label to following:

If(
   !IsBlank(
           LookUp(Gallery1.AllItems, !IsBLank(RequiredItem.Text) &&  IsBlank(Orderquant.Text))
   ),
   true,
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Visible Based on Table

Hi there,

 

My app is essentially a shopping cart for school supplies. Some users must purchase certain items depending on their campus and the course.

 

I used complex logic to make the "Quantity" text input for those items in the gallery pink, as well as to make a "Required Item!" label visible.

 

The items added to the shopping cart are added to a collection. I added a "Req" column to this collection, which would read whether the "Required Item!" label was visible (true or false).

 

Then I created CountIf to count how many required items should exist for each campus/course scenario, and on the checkout page, counted the rows that included "Req="true"". If the checkout count was less than the gallery count, there would be a "Missing Required Item!" label on the checkout page, and if that "Missing Require Item!" label was visible (true or false based on the "Req" comparison/counts), the "Submit Order" button would also be disabled.

 

So, it took a bit, but this has been resolved. 🙂

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,048)