cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WaseemH
Frequent Visitor

Combine formulas

Hi,

I'm trying to combine two formulas on my galley, tried the seperator ";" but doesn't work, can i get some help please!


If(type="All",Tickets,If(type="Tickets older than 3 days", Filter(Tickets, DateCreated <> datetype && DateCreated <>Text(Today()), DateCreated <> Text(DateAdd(Today(), -2)),DateCreated <> Text(DateAdd(Today(), -1))|| DateClosed <> datetype && DateClosed <> Text(Today()), DateClosed <> Text(DateAdd(Today(), -2)),DateClosed <> Text(DateAdd(Today(), -1))),If(type="Tickets opened today",Filter(Tickets,datetype in DateCreated),If(type="Tickets closed today",Filter(Tickets,datetype in DateClosed),Filter(Tickets,type in Status)))))


Search(Tickets,TextInput3.Text,"Chassis")

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @WaseemH ,

The only way i can see is to replace Tickets data source with Search(Tickets,TextInput3.Text,"Chassis"). You can also remove the if sentence marked with red.  

 

 If(type="All",Tickets,If(type="Tickets older than 3 days", Filter(Tickets, DateCreated <> datetype && DateCreated <>Text(Today()), DateCreated <> Text(DateAdd(Today(), -2)),DateCreated <> Text(DateAdd(Today(), -1))|| DateClosed <> datetype && DateClosed <> Text(Today()), DateClosed <> Text(DateAdd(Today(), -2)),DateClosed <> Text(DateAdd(Today(), -1))),If(type="Tickets opened today",Filter(Tickets,datetype in DateCreated),If(type="Tickets closed today",Filter(Tickets,datetype in DateClosed),Filter(Tickets,type in Status)))))

 

 

View solution in original post

3 REPLIES 3
gabibalaban
Super User II
Super User II

Hi @WaseemH ,

The only way i can see is to replace Tickets data source with Search(Tickets,TextInput3.Text,"Chassis"). You can also remove the if sentence marked with red.  

 

 If(type="All",Tickets,If(type="Tickets older than 3 days", Filter(Tickets, DateCreated <> datetype && DateCreated <>Text(Today()), DateCreated <> Text(DateAdd(Today(), -2)),DateCreated <> Text(DateAdd(Today(), -1))|| DateClosed <> datetype && DateClosed <> Text(Today()), DateClosed <> Text(DateAdd(Today(), -2)),DateClosed <> Text(DateAdd(Today(), -1))),If(type="Tickets opened today",Filter(Tickets,datetype in DateCreated),If(type="Tickets closed today",Filter(Tickets,datetype in DateClosed),Filter(Tickets,type in Status)))))

 

 

View solution in original post

timl
Super User III
Super User III

Hi @WaseemH 

It looks like you're trying to combine the filter and search functions. The formula that you have here will not work because to return value from your if statement is returning a table from the filter function, and the search function returns another table.

The code in the post beneath by @CarlosFigueira  provides the syntax that you can use to combine these two functions.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Combining-Filter-and-Sort/td-p/55628

 

WaseemH
Frequent Visitor

It is working like a charm,

 

You made my day,

 

thank you @gabibalaban 

gabibalaban

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (15,120)