cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

I need make a OR function on this formula....

I need to add a funciton "or", can someone help me out?

 

If(Checkbox_MaiorPorcentagem_1.Value= true ;Sort(collTaskListForGallery;TrabalhoPercentualdaTarefaConcluído;Descending);If(Checkbox_MenorPorcentagem_1.Value= true ;Sort(collTaskListForGallery;TrabalhoPercentualdaTarefaConcluído;Ascending);If(Checkbox_Ordemdemanutenção.Value=true;Sort(collTaskListForGallery;OrdemdeManutenção;Descending);If(CheckboOrdemdemanutençãomenor.Value=true;Sort(collTaskListForGallery;OrdemdeManutenção;Ascending);If(toggle_porcentagem.Value= true ;Filter(collTaskListForGallery;TrabalhoPercentualdaTarefaConcluído<100);If(toggle_porcentagem.Value= false ;collTaskListForGallery))))))
9 REPLIES 9
Highlighted
Super User III
Super User III

Re: I need make a OR function on this formula....

Hi @Gorilla_8 ,

Where to you want to put the Or and can you please use Format Text on the code and re-post it.

Highlighted
Post Prodigy
Post Prodigy

Re: I need make a OR function on this formula....

If(
    Checkbox_MaiorPorcentagem_1.Value = true;
    Sort(
        collTaskListForGallery;
        TrabalhoPercentualdaTarefaConcluído;
        Descending
    ); (here if is possible)
    If(
        Checkbox_MenorPorcentagem_1.Value = true;
        Sort(
            collTaskListForGallery;
            TrabalhoPercentualdaTarefaConcluído;
            Ascending
        ); (here if is possible)
        If(
            Checkbox_Ordemdemanutenção.Value = true;
            Sort(
                collTaskListForGallery;
                OrdemdeManutenção;
                Descending
            ); (here if is possible)
            If(
                CheckboOrdemdemanutençãomenor.Value = true;
                Sort(
                    collTaskListForGallery;
                    OrdemdeManutenção;
                    Ascending
                ); (here if is possible)
                If(
                    toggle_porcentagem.Value = true;
                    Filter(
                        collTaskListForGallery;
                        TrabalhoPercentualdaTarefaConcluído < 100
                    ); (here if is possible)
                    If(
                        toggle_porcentagem.Value = false;
                        collTaskListForGallery
                    )
                )
            )
        )
    )
)
Highlighted
Super User III
Super User III

Re: I need make a OR function on this formula....

Thanks @Gorilla_8 ,

What is the Or function you want to put in?

Highlighted
Post Prodigy
Post Prodigy

Re: I need make a OR function on this formula....

This "||" or "OR", I just need to execute many filter all the time, or one one by time, or two, three...

Highlighted
Super User III
Super User III

Re: I need make a OR function on this formula....

Sorry @Gorilla_8 , I will be more specific. 
Is the an alternate filter or an alternate value on the checkbox or something else?

This will determine where the code needs to go.

Can you please supply an example of code you want to put in.

Highlighted
Post Prodigy
Post Prodigy

Re: I need make a OR function on this formula....

No, isnt....

this are the filters

 

 

filteres.png

Highlighted
Super User III
Super User III

Re: I need make a OR function on this formula....

Ok @Gorilla_8 ,

I am trying to help you with code can you please give me an example of the Or code you want to use - that way I can show you where and how it fits. As an example - it you are looking for two different possibilities on control values

If(
    Checkbox_MaiorPorcentagem_1.Value = true ||
    SomeOtherControlValue = whatever;
    Sort(
        collTaskListForGallery;
        TrabalhoPercentualdaTarefaConcluído;
        Descending
    )

If you are asking about Sort alternatives, you can do an If / Else alternative

If(
    Checkbox_MaiorPorcentagem_1.Value = true
    Sort(
        collTaskListForGallery;
        TrabalhoPercentualdaTarefaConcluído;
        Descending
    );
   Sort(
        collTaskListForGallery;
        SomeOtherField
        Descending/Ascending
    )

but you cannot make an Or on Sort as it is a result, not a condition to get the result.

Is this what you are asking?

 

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.

 

Highlighted
Super User III
Super User III

Re: I need make a OR function on this formula....

Hi @Gorilla_8 ,

Thanks for the kudo

Are you saying this solved your issue, if so, please consider Accepting as Solution.

If not, so you have more questions?

Highlighted
Post Prodigy
Post Prodigy

Re: I need make a OR function on this formula....

I appreciate it your help, but didn't work out! 😞

 

However, I am trying figure out here...

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,045)