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

Search multiple data sources from a single search box

Hello,

 

Is it possible to search multiple data sources from a single search box? If so How would I accomplish this?

 

Thanks in advance.

15 REPLIES 15

@ShadowTech ,

I do not have the time to climb through all of that when your initial question was simply

Is it possible to search multiple data sources from a single search box? If so How would I accomplish this?

What particular part is not working for you?

@WarrenBelz That is part of the issue. I've created the Collection but the search and gallery are not being populated. That's why I want a second par of eyes on the formula if it was missing something.

@ShadowTech ,

I actually started trying to parse it, but you have so many nested statements and additional brackets, I could not make logical sense of it. Can you at least use Format Text and paste it in a Text box (the </> icon above), so I can look at it properly of it. Also, you do not need to nest Filter statements and you have a couple of and/or combinations that need proper bracketing.

@WarrenBelz  Thanks again for the help.

 

 

App OnStart:

 

 

 

ClearCollect(
    TestCollection,
    '[dbo].[tblsLine1]',
    '[dbo].[tblso]',
    '[dbo].[SLine2]'
)

 

 

 

 

 

 

Gallery (Items):

 

 

 

Sort(
    If(
        Thevar = 1,
        Filter(
            Filter(
                Search(
                    TestCollection,
                    SearchField1.Text,
                    "Item",
                    "SONumber"
                ),
                Source = "00018" && Status = "open" && (SourceType = "self" Or SourceType = "Loc" && ShipDirect = true)
            ),
            DatePromised >= DateAdd(
                Today(),
                -(Weekday(Today()) - 1)
            ),
            DatePromised <= DateAdd(
                Today(),
                7 - Weekday(Today())
            )
        ),
        Thevar = 2,
        Filter(
            Filter(
                Search(
                    TestCollection,
                    SearchField1.Text,
                    "Item",
                    "SONumber"
                ),
                Source = "00018" && Status = "open" && (SourceType = "self" Or SourceType = "Loc" && ShipDirect = true)
            ),
            DatePromised > Today()
        ),
        Filter(
            Search(
                TestCollection,
                SearchField1.Text,
                "Item",
                "SONumber"
            ),
            Source = "00018" && Status = "open" && (SourceType = "self" Or SourceType = "Loc" && ShipDirect = true)
        )
    ),
    DatePromised,
    Ascending
)

 

 

 

 

 

Button 1: 

 

 

 

Set(
    DTW
)

 

 

 

 

Button 2:

 

 

 

Set(
    PD
)

 

 

 

 

Label 1:

 

 

CountRows(
    Filter(
        Filter(
            Search(
                TestCollection,
                SearchField1.Text,
                "Item",
                "SONumber"
            ),
            Source = "00018" && Status = "open" && (SourceType = "self" Or SourceType = "Loc" && ShipDirect = true)
        ),
        DatePromised >= DateAdd(
            Today(),
            -(Weekday(Today()) - 1)
        ),
        DatePromised <= DateAdd(
            Today(),
            7 - Weekday(Today())
        )
    )
)

 

 

 

Label 2:

 

 

CountRows(
    Filter(
        Filter(
            Search(
                TestCollection,
                SearchField1.Text,
                "Item",
                "SONumber"
            ),
            Source = "00018" && Status = "open" && (SourceType = "self" Or SourceType = "Loc" && ShipDirect = true)
        ),
        DatePromised > Today()
    )
)

 

 

 

 

Updated.

@ShadowTech ,

Could you please use Format Text as below - it will parse it properly

WarrenBelz_0-1615931007626.png

 

@WarrenBelz Ok, I updated my previous post.

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.

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 (5,302)