cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

can i do sort inside sort of gallery?

Hi, i have question this is my code in gallery:

 

With(
    {
        _preFilter: Filter(
            TabCrysisSP,
            StartsWith(
                MCO,
                TextSearchBox2.Text
            ),
            StartsWith(
                'Type no',
                TextSearchBox4.Text
            ),
            IsBlank(ComboBox2_1.Selected.Result) || Vendor = ComboBox2_1.Selected.Result,
            IsBlank(ComboBox2.Selected.Value) || CFT.Value = ComboBox2.Selected.Value,
            IsBlank(ComboBox1.Selected.Value) || Status.Value = ComboBox1.Selected.Value,
            IsBlank(ComboBox3.Selected.Value) || Action.Value = ComboBox3.Selected.Value,
            IsBlank(ComboBox4.Selected.Value) || Criticality.Value = ComboBox4.Selected.Value
        )
    },
    SortByColumns(
        Filter(
            _preFilter,
            IsBlank(ComboBox4_1.Selected.Result) || 'Production Line' in ComboBox4_1.SelectedItems.Result,
            TextSearchBox1.Text in Item,
            ('Delivery date' >= DatePicker1.SelectedDate Or IsBlank(DatePicker1.SelectedDate)) And ('Delivery date' < DateAdd(
                DatePicker2.SelectedDate,
                1,
                Days
            ) Or IsBlank(DatePicker2.SelectedDate))
        ),
        "Created",
        If(
            SortDescending1,
            Descending,
            Ascending
        )
    )
)

 

and i mean this code exactly:

 

('Delivery date' >= DatePicker1.SelectedDate Or IsBlank(DatePicker1.SelectedDate)) And ('Delivery date' < DateAdd(
                DatePicker2.SelectedDate,
                1,
                Days
            ) Or IsBlank(DatePicker2.SelectedDate))

 

if someone type dates in this pickers, then can i sort result from earliest date to oldest?

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

We can try this

    "Created",
    If(
        !IsBlank(DatePicker1.SelectedDate),
        Descending,
        If(
            SortDescending1,
            Descending,
            Ascending
        )
    )


Thanks,
Stalin - Learn To Illuminate

 

View solution in original post

1 REPLY 1
StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

We can try this

    "Created",
    If(
        !IsBlank(DatePicker1.SelectedDate),
        Descending,
        If(
            SortDescending1,
            Descending,
            Ascending
        )
    )


Thanks,
Stalin - Learn To Illuminate

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,328)