cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SergiuTPLS
Helper II
Helper II

Lookup list for multiple conditions

Hi,

 

I'm trying to make a formula that search in a list if the are 3 conditions : operator name is as selected(label7_25), Start field (datetime value field) is not empty and Stop field (datetimevalue field) is empty; so to see if an operator is working on a job.

 

It's not working like that. If I leave only Label=Operator and take out start and stop, it's giving me an answer but I need also those 2 conditions to be met.

 

LookUp(CentralizareTLSC2021,Label7_25.Text=Operator.Value && !IsEmpty(Start) && IsEmpty(Stop),Text(Masina.Value))

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

@SergiuTPLS ,

I guessed NZ but forgot the PM (NZ is UTC + 12), but that is not relevant. If you want Start with a value and stop without one and they are Date fields

Text(
   LookUp(
      CentralizareTLSC2021,
      Operator.Value = Label7_25.Text && 
      Value(Start) > 0 && 
      Value(Stop) < 1
   ).Masina.Value
)

 

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

 

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @SergiuTPLS ,

Try this

Text(
   LookUp(
      CentralizareTLSC2021,
      Operator.Value = Label7_25.Text && 
      Value(Start) > 0 && 
      Value(Stop) > 0
   ).Masina.Value
)

 

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

this conditions are not ok

&&

Value(Start) > 0

&& Value(Stop) > 0

 

I've tried with IsEmpty, IsBlank it's still not working.

 

Start value is 07.11.2021 09:30

Stop value is empty (operator still doing the job)

 

Hello,

try the same formula as @WarrenBelz wrote but if you have issues with && use the AND function

ex: AND( condition 1, condition 2, condition 3)

Hope this help,

Regards.

The start value is blank from what it appears, but in the list the value is 07.11.2021 09:30

the syntax of calling the Start value is the problem I belive

 

SergiuTPLS_0-1636276762854.png

 

@AmeerJab ,

What is your data source and what type of fields are Start and Stop? It also appears you have the current data/time (I assume you are in NZ) in the list value. 

Start and Stop are DateTime fields

Time zone is +2.00 (Bucharest, Romania)

the condition is not related to the value of the Start but to the presence of Start and absence of Stop(operator is working on a job)

if you try to store the start value in a variable and then use it, just to make sure that you're passing it, and is there a start value for each record? or it's just one for all the records? 

@SergiuTPLS ,

I guessed NZ but forgot the PM (NZ is UTC + 12), but that is not relevant. If you want Start with a value and stop without one and they are Date fields

Text(
   LookUp(
      CentralizareTLSC2021,
      Operator.Value = Label7_25.Text && 
      Value(Start) > 0 && 
      Value(Stop) < 1
   ).Masina.Value
)

 

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

 

Thank you big time!

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,677)