Hi ,
I'm having below lookup statement on Onchange , It worked perfectly with one condition but with two conditions , it doesn't do the validation . There are no syntax errors . Pls help me
If(IsBlank(LookUp(AssetTransactions, AssetNumber=Self.Text && Completed.Value="Complete")),UpdateContext({RecValid: false}),UpdateContext({RecValid: true}),UpdateContext({MakeItRed:!MakeItRed}))
With only one condition it's working fine
If(IsBlank(LookUp(AssetTransactions, AssetNumber=Self.Text )),UpdateContext({RecValid: false}),UpdateContext({RecValid: true}),UpdateContext({MakeItRed:!MakeItRed}))
rgds
AD
Thanks WarrenBelz,
It worked fine
rgds
AD
Hi @ajithd6368 ,'
Firstly, you have three conditions on the IF statement - the last one will never trigger (I think you are trying to do the below). You can also do this assuming AssetNumber is a Text field (not numeric) and Completed is a Choice field.
UpdateContext(
{
RecValid:
!IsBlank(
LookUp(
AssetTransactions,
AssetNumber = Self.Text &&
Completed.Value = "Complete"
)
)
}
);
UpdateContext({MakeItRed: !MakeItRed})
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.
Visit my blog Practical Power Apps
WarrenBelz
110
Most Valuable Professional
MS.Ragavendar
77
stampcoin
52