cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FelipeCaru
Level 8

Re: Gallery 1 is used for Gallery 2 filter

@RandyHayes 

2 questions:

First:

While that does work, the problem I have is that I do not want to count -all- of the items, rather- all the 'unique' subtask the item might or might not have. I decided to try instead adding how many "depending on" (or sub item) an item has in Excel, for example, project 1 has -2- "depending on" below it, on column "Dependiente". How would I call that, from the group by? If the gallery formula (of project) is:

GroupBy(Filter(Consolidado_Piloto, Or(Lower(User().Email)=Lower('PowerApp Admin'), Lower(User().Email)=Lower('Responsable ARQ'), Lower(User().Email)=Lower('Responsable ING')) && Len('Nombre Tarea')>0),"Nombre_x0020_Proyecto","Proyectos")

How would I be able to 'call'/show the grouped column of 'depend on'? I tried with:

ThisItem.Proyectos.Dependientes

However that gives the error of: "property expects text values, but this rule produces incompatible Table values"

----

Second question:

With further gallery sorted as:

GroupBy(galleryListaProyecto.Selected.Proyectos,"Nombre_x0020_Tarea","Tareas")

if I want/need to add a new, different filter such as "len(subtask)>0", how would I go doing that? Since it would be a new filter.

Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

@FelipeCaru 

I am looking at your example picture:

I'm a little confused on the grouping you have because those column names are cut off.
You have the first project that appears to have 24 Tareas, but they all look like (in the picture) to be the same name.  Are they, in fact, different?

 

As for the first question. Yes, you will get an error with that formula as you are trying to produce a text value from a table.  I'm not entirely sure what you are aiming at for the Dependiente, but, the Proyectos is a table of records, it does not have a property of Dependientes, however every record in it does. So, you could sum them if you want.

 

Sum(ThisItem.Proyectos, Dependientes)

 

For the Second question - if you want to exclude any subtask items that are blank (len(subtask)>0 - which is clearer with !IsBlank(subtask)) the question is, do you want to exclude them all together, or just from the second gallery?

If you want to exclude them all together, then you can put that in your first gallery

 

GroupBy(Filter(Consolidado_Piloto, 
(Lower(User().Email)=Lower('PowerApp Admin') || Lower(User().Email)=Lower('Responsable ARQ') || Lower(User().Email)=Lower('Responsable ING')) && !IsBlank('Nombre Tarea') && !IsBlank('Nombre Subtarea'),
"Nombre_x0020_Proyecto","Proyectos")

However, in the case of your example in the picture, it's really not necessary as I saw one example where the Tarea was blank...that entire record would be excluded from the !IsBlank('Nobre Tarea'), so adding the additional check is not needed.  But, if you have other records where there might be a name for the Tarea, but none for the Subtarea, then yes, just add it in as above.

 

 

If, however, you want to just exclude from the second, then it would be this in your galleryListaTareas:

GroupBy(Filter(galleryListaProyecto.Selected.Proyectos, !IsBlank('Nombre Subtarea)) ,"Nombre_x0020_Tarea","Tareas")

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
FelipeCaru
Level 8

Re: Gallery 1 is used for Gallery 2 filter

@RandyHayes 

excelSource2.png

I think there might be seen better. You are right regarding the repeated name of task or subtask (column B and C), since that is the way I have the Excel file as to know what info a line has. For example, "Aprobación" has the 16 records in the red square, hence the 16 on the first "Aprobación" line, showing it has 16 "below it" in hierarchy. However, those below it have 0.

Below, on the orange box, "Mecánica de suelos" has 0 below it, hence, zero; however, the "Compra de Terreno" has 3, which are shown in the column D at the end. Does this make it clearer? Each line is a different item, with different dates and info.

In the gallery, which was previously said, I have it as Title/Subtitle, with Title being the "Nombre proyecto" and I want the subtitle now to have the numbe of records it has, for example, in this case it would have 2, which are "Aprobación" and "Ejecución". That number is stored on the first line, column E. Is there a way to get that number from the groupedBy gallery?

 

Regarding the second part, will test that later on and will get back at you

Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

@FelipeCaru 

Always clearer in pictures! 😉

Your data is fine.  You don't need to create a Dependientes column though, you can get all of this directly in PowerApps.

Let me digest this for a moment and I'll shoot you an App with it all nailed down for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

@FelipeCaru 

Okay, thought it would be easier to take your data and throw together an App to demonstrate this.

 

Please look at the attached App and you will see all the Galleries listed with their appropriate items, correct counts and proper grouping.  No Dependientes columns needed.

 

Look at the OnVisible of the Screen to see the Data structure as you had in your picture.  Obviously I used a collection for this sample rather than an excel file.

Look at the Gallery Items properties and the labels properties to see the formulas needed.

 

Take a look and let me know if you still have questions.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

FelipeCaru
Level 8

Re: Gallery 1 is used for Gallery 2 filter

@RandyHayes 

Quick question: to see that, I need to upload that as a package in web.powerapps?

Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

Yes, just go into any app and then go to file-open and then open that file.
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
FelipeCaru
Level 8

Re: Gallery 1 is used for Gallery 2 filter

@RandyHayes 

Thank you so much. That 'demo' so to speak you did helped me through it and works perfectly. Many, many thanks (:

Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

Hi @RandyHayes 

I'm really impressed at how much effort you've put into answering this, plus a demo app in Spanish! Seriously well done!

Super User
Super User

Re: Gallery 1 is used for Gallery 2 filter

@timl 

Thanks much!  I got to the point where it seemed easier to provide a quick solution for @FelipeCaru rather than tie him up with the back and forth messages.  Seems like it hit the spot!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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