So, I'm pretty sure I know the answer to this but I'm hoping someone can guide me in another way to do what I'm doing. I have the below If statement (I actually have four of them that are similar but just set the variables to different values based on the condition):
If(
And(
varProductType = "Advanced",
varCareType = "Plus"
),
UpdateContext(
{
varDescription_3: Filter(
Products,
ProductDescription = ddoCare.SelectedText.Value & " for " & cboDescription_1.Selected.ProductDescription
),
varDescription_4: Filter(
Products,
ProductDescription = ddoCare.SelectedText.Value & " for " & cboDescription_2.Selected.ProductDescription
),
varDescription_5: Filter(
Products,
ProductDescription = ""
),
varDescription_6: Filter(
Products,
ProductDescription = ""
),
varDescription_7: Filter(
Products,
ProductDescription = ""
)
}
)
)
I have come to the point where I need to make the variables Global. However, from everything I have read, I can use the Set function to set multiple variables at once like you can with UpdateContext. I really don't want to have to create an If statement for every single variable because I have three more If statements like the one above so I would end up with 20 If statements. I could do but it just seems like there would be a better way.
Any thoughts?