cancel
Showing results for
Did you mean:
Helper II

## How to link between 2 if statement codes

Hello,

I want to link between 2 if statement code.

I tried & but it didn't work, I'm getting both values 519 and 591 same as the figure below.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

You are using or condition so for eg for value 9 both the condition will be true. because it's less than 11 and also less then 59. Also you are using & which is concat operator. You just need to start another if in the else block of the first if.

if(Value(DataCardValue447.Text)>=1 && Value(DataCardValue447.Text) <11,519,if(Value(DataCardValue447.Text)>=11 && Value(DataCardValue447.Text) <11,591))

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 REPLIES 4
Super User

Try:

``````If(
Value(DataCardValue447.Text) >= 1 || Value(DataCardValue447.Text) < 11, 519,
Value(DataCardValue447.Text) >= 11 || Value(DataCardValue447.Text) < 50, 591
)``````

It looks like you are trying to evaluate on intervals though. Should || be replaced by &&?

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Resolver II

Just change & to ,

If(logic 1, 519, If(locgic 2, 591))

Super User

You are using or condition so for eg for value 9 both the condition will be true. because it's less than 11 and also less then 59. Also you are using & which is concat operator. You just need to start another if in the else block of the first if.

if(Value(DataCardValue447.Text)>=1 && Value(DataCardValue447.Text) <11,519,if(Value(DataCardValue447.Text)>=11 && Value(DataCardValue447.Text) <11,591))

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Champion

You are having greater than and less or equal to all referring to 11.

Can add some explanation on what you want to achieve?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA