Error with > OR < statement

%3CLINGO-SUB%20id%3D%22lingo-sub-2176261%22%20slang%3D%22en-US%22%3EError%20with%20%26gt%3B%20OR%20%26lt%3B%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2176261%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20fairly%20new%20to%20Power%20Apps%20and%20am%20having%20trouble%20creating%20a%20statement%20for%20the%20following%20scenario%3A%3C%2FP%3E%3CP%3EIf%20%22weekly%20hours%22%20%26lt%3B%3D5%20or%20%26gt%3B%3D10%2C%20then%20need%20to%20have%20prompt%20which%20would%20mandate%26nbsp%3B%20employee%20input%20comments%20stating%20reason%20for%20falling%20out%20of%20parameters.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20greatly%20appreciated.%26nbsp%3B%20Thank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2176261%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2176573%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20with%20%26gt%3B%20OR%20%26lt%3B%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2176573%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F982818%22%20target%3D%22_blank%22%3E%40KAC0413%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20any%20one%20of%20the%20below%20formulas%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3EIf(%22weekly%20hours%22%20%26lt%3B%3D%205%20Or%20%22weekly%20hours%22%20%26gt%3B%3D%2010%2C%20true%2C%20false)%0A%2F%2FOR%0AIf(%22weekly%20hours%22%20%26lt%3B%3D%205%20%7C%7C%20%22weekly%20hours%22%20%26gt%3B%3D%2010%2C%20true%2C%20false)%0A%2F%2FOR%0AIf(Or(%22weekly%20hours%22%20%26lt%3B%3D%205%2C%20%22weekly%20hours%22%20%26gt%3B%3D%2010)%2C%20true%2C%20false)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EReference%3C%2FSTRONG%3E%3A%26nbsp%3B%3CA%20title%3D%22And%2C%20Or%2C%20and%20Not%20functions%20in%20Power%20Apps%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowerapps%2Fmaker%2Fcanvas-apps%2Ffunctions%2Ffunction-logicals%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAnd%2C%20Or%2C%20and%20Not%20functions%20in%20Power%20Apps%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I'm fairly new to Power Apps and am having trouble creating a statement for the following scenario:

If "weekly hours" <=5 or >=10, then need to have prompt which would mandate  employee input comments stating reason for falling out of parameters.  

 

Any suggestions would be greatly appreciated.  Thank you

1 Reply

@KAC0413 

 

Try any one of the below formulas:

 

If("weekly hours" <= 5 Or "weekly hours" >= 10, true, false)
//OR
If("weekly hours" <= 5 || "weekly hours" >= 10, true, false)
//OR
If(Or("weekly hours" <= 5, "weekly hours" >= 10), true, false)

 

 

ReferenceAnd, Or, and Not functions in Power Apps 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.