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
Solved! Go to Solution.
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. 🙂
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
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,
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. 🙂
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |