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

Control content presented within gallery with different buttons

Hello,

 

Here is my scenario.

 

I have 3 buttons that I want to manipulate a single gallery. The gallery is a SharePoint list.

 

The buttons are as follows:

 

  • Button1 = Show "all" items within the gallery.
  • Button2 = Show only "new" items created in the last month.
  • Button 3 = Show only "not viewed" items. Basically, an item in the gallery is marked as "viewed" if the users profile name is in the "User" created column in the SharePoint list.
  • Search button= search gallery. Search items name & short description.

 

filter1.jpg

 

 

Also, each Item in the SharePoint list is assigned to a particular "category" column. I have left and right arrows to cycle through the different categories (category1, category2, category3, etc. I want to have the gallery show only the items belonging to those categories.

 

nav1.jpg

 

 

Options and examples would be much appreciated.

 

Thanks in advance.

9 REPLIES 9

Hi @ShadowTech 

To control the content presented within your gallery using different buttons, you can create a dynamic filter system. 

Start by creating a variable to hold the current filter. This will help you switch between different filters based on which button is clicked.

Define the Filter Variable: Create a variable called currentFilter.

then change the onSelect action of each Button

Button1: set(currentFilter, "All" )
Button2: set(currentFilter, "New").
Button3: set(currentFilter, "NotViewed" )

Search Button: 'Filter(YourSharePointList, StartsWith(Title, txtSearch.Text) || StartsWith(ShortDescription, txtSearch.Text))' (Assuming you have a TextInput control for search named 'txtSearch')

Update the gallery’s items property to check the value of currentFilter and apply the appropriate filter.

it should look something like this


If(
currentFilter = "All",
YourSharePointList,
currentFilter = "New",
Filter(YourSharePointList, Created >= DateAdd(Today(), -1, Months)),
currentFilter = "NotViewed",
Filter(YourSharePointList, Not(User() in 'User Column')),
currentFilter = "Search",
Filter(YourSharePointList, StartsWith(Title, txtSearch.Text) || StartsWith(ShortDescription, txtSearch.Text)),
YourSharePointList // Default to showing all if no filter is set
)


You can also put the whole fiter in the variable and change it when you press a button. like


Button2: When clicked, set(currentFilter,Filter(YourSharePointList, Created >= DateAdd(Today(), -1, Months)))


For the Category Navigation ill need more detail about which control you are using to change the category, it can affect the code but ill give you an idea you can try


Initialize a variable for the current category (or leave it empty by default). For example, Set(currentCategory, "Category1").

Use the left arrow to cycle to the previous category and the right arrow to cycle to the next category. You can update the category like this:


Left Arrow OnSelect: Set(currentCategory, Switch(currentCategory, "Category1", "Category3", "Category2", "Category1", "Category3", "Category2"))

Right Arrow OnSelect: Set(currentCategory, Switch(currentCategory, "Category1", "Category2", "Category2", "Category3", "Category3", "Category1"))


Update the gallery’s items property to include the current category filter:
Filter(YourSharePointList, Category = currentCategory)


I hope this is clear enough, If you have any questions or feedback, please let me know. 😁!

@Giraldoj 

 

These are the errors I'm seeing when entering the gallery formula for the buttons and search. It doesn't seem to like some of it. Suggestions?

 Also, the category buttons don't switch. Actually, the gallery shows all items not associated with those categories.

 

The "Employees who have completed curriculum is a choice column as is "Category" column.

errors.jpg

Hi @ShadowTech 

I apologize for the errors in my previous responses. Below, you’ll find the corrected information. I’ve also replicated the filters in my environment to ensure the accuracy of the codes. Please adjust them according to the specific names of the items in your data source.

For context,With the following code I’m creating a collection in the OnStart property of the application to mimic your data source:

ClearCollect(
    'Employee Training',
   Table(
    {Created: Date(2024,01,15), Title: "Curso 1", course_description: "Descripción Curso 1", Used: false, User: "usuario_pwp@hiberusspo365demo.onmicrosoft.com", Category: "Category1"},
    {Created: Date(2024,02,20), Title: "Curso 2", course_description: "Descripción Curso 2", Used: true, User: "usuario_generico1@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,03,10), Title: "Curso 3", course_description: "Descripción Curso 3", Used: false, User: "usuario_generico2@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,04,25), Title: "Curso 4", course_description: "Descripción Curso 4", Used: true, User: "usuario_generico3@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,05,15), Title: "Curso 5", course_description: "Descripción Curso 5", Used: false, User: "usuario_generico4@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,06,20), Title: "Curso 6", course_description: "Descripción Curso 6", Used: true, User: "usuario_generico5@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,07,10), Title: "Curso 7", course_description: "Descripción Curso 7", Used: false, User: "usuario_generico6@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,08,25), Title: "Curso 8", course_description: "Descripción Curso 8", Used: true, User: "usuario_generico7@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,09,15), Title: "Curso 9", course_description: "Descripción Curso 9", Used: false, User: "usuario_generico8@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,10,20), Title: "Curso 10", course_description: "Descripción Curso 10", Used: true, User: "usuario_generico9@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,11,10), Title: "Curso 11", course_description: "Descripción Curso 11", Used: false, User: "usuario_generico10@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,12,25), Title: "Curso 12", course_description: "Descripción Curso 12", Used: true, User: "usuario_generico11@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,01,20), Title: "Curso 13", course_description: "Descripción Curso 13", Used: false, User: "usuario_generico12@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,02,10), Title: "Curso 14", course_description: "Descripción Curso 14", Used: true, User: "usuario_generico13@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,03,25), Title: "Curso 15", course_description: "Descripción Curso 15", Used: false, User: "usuario_generico14@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,04,15), Title: "Curso 16", course_description: "Descripción Curso 16", Used: true, User: "usuario_generico15@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,05,20), Title: "Curso 17", course_description: "Descripción Curso 17", Used: false, User: "usuario_generico16@ejemplo.com", Category: "Category2"},
    {Created: Date(2024,06,10), Title: "Curso 18", course_description: "Descripción Curso 18", Used: true, User: "usuario_generico17@ejemplo.com", Category: "Category3"},
    {Created: Date(2024,07,25), Title: "Curso 19", course_description: "Descripción Curso 19", Used: false, User: "usuario_generico18@ejemplo.com", Category: "Category1"},
    {Created: Date(2024,08,15), Title: "Curso 20", course_description: "Descripción Curso 20", Used: true, User: "usuario_generico19@ejemplo.com", Category: "Category2"}
)

);
Set(
    currentCategory,
    "Category1"
)
Also im defining a Default Category, Now lets start with the bottons 

Button All: Set(currentFilter, "All" )
Button New: Set(currentFilter, "New")
Button Not Started: Set(currentFilter, "NotViewed" )
Button Search (loop): Set(currentFilter, "Search")

Gallery items Property:

If(
    currentFilter = "All",
    Filter('Employee Training', Category = currentCategory),

    currentFilter = "New",
    Filter(Filter('Employee Training', Created >= DateAdd(Today(), -1, TimeUnit.Months)), Category = currentCategory),

    currentFilter = "NotViewed",
    Filter(Filter('Employee Training', Not(User().Email in User)), Category = currentCategory),

    currentFilter = "Search",
    Filter(Filter('Employee Training', StartsWith(Title, txtSearch.Value) || StartsWith(course_description, txtSearch.Value)), Category = currentCategory),
   
    Filter('Employee Training', Category = currentCategory) // Default to showing all if no filter is set
)

and finally the arrows 

Right arrow: Set(currentCategory, Switch(currentCategory, "Category1", "Category2", "Category2", "Category3", "Category3", "Category1"))
 
Left Arrow: Set(currentCategory, Switch(currentCategory, "Category1", "Category3", "Category2", "Category1", "Category3", "Category2"))
 
Category text field:  currentCategory

@Giraldoj 

 

Hello,

 

Below is what I'm seeing now. I did make a couple changes. Let me know if you agree. And I think I was not so clear about the user profiles for the not started. I need the app/screen to look at the users profile name that accesses the app and if their name is not in the "Employees who have completed curriculum" column, then it will show that Item for "Not Started". So the "Not Started" button should show only items that don't have the users profile name in that column.

 

I hope this makes more sense.

 

1. Replaced ".Value" to Category as this Column is a choice column.

2. Replaced ".Value" for the text box with ".Text" as this is a text field.

Bar.jpg

 

 

For some reason I'm getting an error for "User". 

 

error_output.jpg

 

Also, can you explain the syntax for the categories of the arrow buttons? I'm a bit confused with the Category1, category2, category2, category3, category3.

 And what's the best way to integrate the syntax below as it will filter the gallery by "Title".

 

 

(Filter([@'Employee Training'], Title = "TrulinX Training")

 

 

Thanks again.

 

Hi @ShadowTech 

 

Thanks for the additional details. If you want to filter the records where the user is not equal to the current user by clicking the "Not Started" button, you can use the following formula:

currentFilter = "NotViewed",
Filter('Employee Training', User().FullName <> User, Category = currentCategory)

This formula might differ based on the data type of the User attribute in your table. If User is a record, you should use User.Name, for example.

If the previous formula doesn't work, please hover your mouse over the error to display the details so I can better understand how to correct the filtering based on the data type of the User column.


Now, the Switch function in Power Fx works by pairing each case with a result. Here’s the sequence:


Set(currentCategory, Switch(currentCategory, "Category1", "Category2", "Category2", "Category3", "Category3", "Category1"))

What that Switch function does is basically the following:

If currentCategory is "Category1", it sets currentCategory to "Category2".
If currentCategory is "Category2", it sets currentCategory to "Category3".
If currentCategory is "Category3", it sets currentCategory to "Category1".

You can find more information about the Switch function here.

https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-if

Whether the Switch function is a match for your requirement depends on the details about your categories. Please provide more detail so we can find a better approach.

Now integrating  the additional filter totally depends on what you want to acheive, if that title is going to be dynamic or is always going to be the same, if is static so you can just adjust your items gallery property by additing and additional OR on each filter case, something like

If(
currentFilter = "All",
Filter('Employee Training', Category = currentCategory || Title = "TrulinX Training"),

currentFilter = "New",
Filter(Filter('Employee Training', Created >= DateAdd(Today(), -1, TimeUnit.Months) || Title = "TrulinX Training"), Category = currentCategory),

currentFilter = "NotViewed",
Filter(Filter('Employee Training', User().FullName <> User || Title = "TrulinX Training"), Category = currentCategory),

currentFilter = "Search",
Filter(Filter('Employee Training', StartsWith(Title, txtSearch.Value) || StartsWith(course_description, txtSearch.Value) || Title = "TrulinX Training"), Category = currentCategory),

Filter('Employee Training', Category = currentCategory || Title = "TrulinX Training") // Default to showing all if no filter is set
)

@Giraldoj 

 

First off, let me say thank you for your assistance thus far. This is what's not showing for me so far.

 

I made a couple changes and have a couple questions.

 

 

If(
currentFilter = "All",
Filter('Employee Training', Category.Value = currentCategory || Title = "TrulinX Training"),

currentFilter = "New",
Filter(Filter('Employee Training', Created >= DateAdd(Today(), -1, TimeUnit.Months) || Title = "TrulinX Training"), Category.Value = currentCategory),

currentFilter = "Not Started",
Filter(Filter('Employee Training', User().FullName in 'Employees who have completed curriculum'.DisplayName || Title = "TrulinX Training"), Category.Value = currentCategory),

currentFilter = "Search",
Filter(Filter('Employee Training', StartsWith(Title, TextInput1_1.Text) || StartsWith('Course description', TextInput1_1.Text) || Title = "TrulinX Training"), Category.Value = currentCategory),

Filter('Employee Training', Category.Value = currentCategory || Title = "TrulinX Training") // Default to showing all if no filter is set
)

 

 

1. The "new" Button is not showing any new items added in the last month. When clicking the button, the gallery goes blank. Not sure what's going on there.

2. The "Not Started" button does not show just the items that DO NOT have the current users name in the "Employees who have completed curriculum" column in the SharePoint list. It just shows every item in the list. So basically, if the current users name is in the "Employees who have completed curriculum" people's column, then the gallery should NOT be showing those items.

3. The Search button should be pointing to the textbox correct? In this case, TextInput1_1.text.

4. The items are not changing per the categories. There are currently 13 different categories for this gallery.

 

Thanks again.

Hi @ShadowTech 

 

I'm glad that my previous answer was useful. Let's now clarify a few points.

1. For the new button:
The logic depends a lot on your column data type or format. Try displaying the date in a label first to identify what kind of date you are extracting from SharePoint.

Sometimes you need to transform the date before making any comparisons. For example, if you have a date stored in a text field, you can use DateValue to convert a string to a date. In my example, Created is a date column, and the formula below is working just fine:

    currentFilter = "New",
    Filter(
        Filter(
            'Employee Training',
            Created >= DateAdd(
                Today(),
                -1,
                TimeUnit.Months
            ) || Title = "TrulinX Training"
        ),
        Category = currentCategory
    ),

2. The "Not Started" Button:
The code you have for the "Not Started" button is incorrect. In my last response, I made a small change by using a different operator (<>) to filter all names different from the current user's name.

Again, I cannot give you the exact formula because I don't know the properties of your people column. A good approach could be displaying the value in a label to figure out the property name where the full name is stored. Additionally, keep in mind that the full name in SharePoint might not be the same as in Dataverse.

I just changed the formula of the filter to show you how you should apply the filter if your column has for example a property called DisplayName, in this case my table column name is User, its an object an im using the DisplayName property:

    currentFilter = "NotViewed",
    Filter(
        Filter(
            'Employee Training',
            User().FullName <> User.DisplayName
        ),
        Category = currentCategory
    ),

 

3.The Search Button:
That's correct. In my previous response, I used the modern controls, which is why I referenced TextInput1_1.Value. However, if you are using the older controls, your formula should look something like the sample below.

Additionally, your formula depends on the outcome you want to achieve. In my previous example, we used the StartsWith function, which checks just the start of your string. If you want to check the input value within the entire text, you should use the Search function instead. The Search function allows you to search for the keyword in any place across several columns simultaneously. The formula should look something like this:

    currentFilter = "Search",
    Filter(
        Search(
            'Employee Training',
            TextInput1_1.Text,
            Title,
            course_description
        ),
        Category = currentCategory
    ),

4. Categories:
Pretty much the same. I'm just giving you an example based on the information you provided; it may or may not work depending on your exact requirements. If you have 13 categories, my previous answer might be cumbersome. So, instead of using that complex Switch function, let's try something different.

If you have a table, array, or collection with your categories, and your categories have an ID or index, you can take a different approach.

I started by creating my entire categories table:

ClearCollect(
   Categories,
   Table(
       {Index: 1, Category: "Category1"},
       {Index: 2, Category: "Category2"},
       {Index: 3, Category: "Category3"},
       {Index: 4, Category: "Category4"},
       {Index: 5, Category: "Category5"},
       {Index: 6, Category: "Category6"},
       {Index: 7, Category: "Category7"},
       {Index: 8, Category: "Category8"},
       {Index: 9, Category: "Category9"},
       {Index: 10, Category: "Category10"},
       {Index: 11, Category: "Category11"},
       {Index: 12, Category: "Category12"},
       {Index: 13, Category: "Category13"}
   )
);

Set(currentCategoryIndex, 1);
Set(currentCategory, LookUp(Categories, Index = currentCategoryIndex).Category)

In this case i have created a table of categories and each category has an index that will help to navigate with the arrow buttons

this is the code for the right button:

Set(currentCategoryIndex, If(currentCategoryIndex < CountRows(Categories), currentCategoryIndex + 1, 1));
Set(currentCategory, LookUp(Categories, Index = currentCategoryIndex).Category)

and this one is for the left button:

Set(currentCategoryIndex, If(currentCategoryIndex > 1, currentCategoryIndex - 1, CountRows(Categories)));
Set(currentCategory, LookUp(Categories, Index = currentCategoryIndex).Category)

This aproach is much better because you can add infinite categories without changing the arrows code.


And finally this is my on start code so you can understand how im builing everything to be as similar as your case as possible, maybe it will help you to understand the logic of the filter:

ClearCollect(
    'Employee Training',
    Table(
        {
            Created: Date(2024, 06, 15),
            Title: "Course 1",
            course_description: "Introduction to Power Apps and its basic functionalities.",
            Used: false,
            User: {
                UserEmail: "usuario_pwp@hiberusspo365demo.onmicrosoft.com",
                DisplayName: "PWP Prototype"
            },
            Category: "Category 1"
        },
        {
            Created: Date(2024, 05, 20),
            Title: "Course 2",
            course_description: "Advanced SharePoint integration techniques.",
            Used: true,
            User: {
                UserEmail: "usuario_generico1@ejemplo.com",
                DisplayName: "Generic User 1"
            },
            Category: "Category 2"
        },
        {
            Created: Date(2024, 04, 10),
            Title: "Course 3",
            course_description: "Building custom connectors in Power Apps.",
            Used: false,
            User: {
                UserEmail: "usuario_generico2@ejemplo.com",
                DisplayName: "Generic User 2"
            },
            Category: "Category 3"
        },
        {
            Created: Date(2024, 03, 25),
            Title: "Course 4",
            course_description: "Understanding Power Automate workflows.",
            Used: true,
            User: {
                UserEmail: "usuario_generico3@ejemplo.com",
                DisplayName: "Generic User 3"
            },
            Category: "Category 4"
        },
        {
            Created: Date(2024, 05, 15),
            Title: "Course 5",
            course_description: "Creating responsive designs in Power Apps.",
            Used: false,
            User: {
                UserEmail: "usuario_generico4@ejemplo.com",
                DisplayName: "Generic User 4"
            },
            Category: "Category 5"
        },
        {
            Created: Date(2024, 02, 20),
            Title: "Course 6",
            course_description: "Using Dataverse for data management.",
            Used: true,
            User: {
                UserEmail: "usuario_generico5@ejemplo.com",
                DisplayName: "Generic User 5"
            },
            Category: "Category 6"
        },
        {
            Created: Date(2024, 07, 10),
            Title: "Course 7",
            course_description: "Securing your Power Apps environment.",
            Used: false,
            User: {
                UserEmail: "usuario_generico6@ejemplo.com",
                DisplayName: "Generic User 6"
            },
            Category: "Category 7"
        },
        {
            Created: Date(2024, 08, 05),
            Title: "Course 8",
            course_description: "Best practices for Power BI integration.",
            Used: true,
            User: {
                UserEmail: "usuario_generico7@ejemplo.com",
                DisplayName: "Generic User 7"
            },
            Category: "Category 8"
        },
        {
            Created: Date(2024, 09, 01),
            Title: "Course 9",
            course_description: "Automating tasks with AI Builder.",
            Used: false,
            User: {
                UserEmail: "usuario_generico8@ejemplo.com",
                DisplayName: "Generic User 8"
            },
            Category: "Category 9"
        },
        {
            Created: Date(2024, 06, 20),
            Title: "Course 10",
            course_description: "Introduction to Power Platform governance.",
            Used: true,
            User: {
                UserEmail: "usuario_generico9@ejemplo.com",
                DisplayName: "Generic User 9"
            },
            Category: "Category 10"
        },
        {
            Created: Date(2024, 05, 30),
            Title: "Course 11",
            course_description: "Creating user-friendly interfaces.",
            Used: false,
            User: {
                UserEmail: "usuario_generico10@ejemplo.com",
                DisplayName: "Generic User 10"
            },
            Category: "Category 11"
        },
        {
            Created: Date(2024, 04, 25),
            Title: "Course 12",
            course_description: "Integrating with external data sources.",
            Used: true,
            User: {
                UserEmail: "usuario_generico11@ejemplo.com",
                DisplayName: "Generic User 11"
            },
            Category: "Category 12"
        },
        {
            Created: Date(2024, 03, 10),
            Title: "Course 13",
            course_description: "Deploying solutions in Power Apps.",
            Used: false,
            User: {
                UserEmail: "usuario_generico12@ejemplo.com",
                DisplayName: "Generic User 12"
            },
            Category: "Category 13"
        },
        {
            Created: Date(2024, 02, 10),
            Title: "Course 14",
            course_description: "Managing Power Apps environments.",
            Used: true,
            User: {
                UserEmail: "usuario_generico13@ejemplo.com",
                DisplayName: "Generic User 13"
            },
            Category: "Category 1"
        },
        {
            Created: Date(2024, 01, 25),
            Title: "Course 15",
            course_description: "Advanced customizations in Power Apps.",
            Used: false,
            User: {
                UserEmail: "usuario_generico14@ejemplo.com",
                DisplayName: "Generic User 14"
            },
            Category: "Category 2"
        },
        {
            Created: Date(2024, 04, 15),
            Title: "Course 16",
            course_description: "Understanding Power Apps licensing.",
            Used: true,
            User: {
                UserEmail: "usuario_generico15@ejemplo.com",
                DisplayName: "Generic User 15"
            },
            Category: "Category 3"
        },
        {
            Created: Date(2024, 05, 20),
            Title: "Course 17",
            course_description: "Creating efficient workflows.",
            Used: false,
            User: {
                UserEmail: "usuario_generico16@ejemplo.com",
                DisplayName: "Generic User 16"
            },
            Category: "Category 4"
        },
        {
            Created: Date(2024, 06, 10),
            Title: "Course 18",
            course_description: "Using templates for quick development.",
            Used: true,
            User: {
                UserEmail: "usuario_generico17@ejemplo.com",
                DisplayName: "Generic User 17"
            },
            Category: "Category 5"
        },
        {
            Created: Date(2024, 07, 25),
            Title: "Course 19",
            course_description: "Exploring Power Apps mobile capabilities.",
            Used: false,
            User: {
                UserEmail: "usuario_generico18@ejemplo.com",
                DisplayName: "Generic User 18"
            },
            Category: "Category 6"
        },
        {
            Created: Date(2024, 08, 15),
            Title: "Course 20",
            course_description: "Integrating Power Apps with Teams.",
            Used: true,
            User: {
                UserEmail: "usuario_generico19@ejemplo.com",
                DisplayName: "Generic User 19"
            },
            Category: "Category 7"
        }
    )
);

ClearCollect(
   Categories,
   Table(
       {Index: 1, Category: "Category 1"},
       {Index: 2, Category: "Category 2"},
       {Index: 3, Category: "Category 3"},
       {Index: 4, Category: "Category 4"},
       {Index: 5, Category: "Category 5"},
       {Index: 6, Category: "Category 6"},
       {Index: 7, Category: "Category 7"},
       {Index: 8, Category: "Category 8"},
       {Index: 9, Category: "Category 9"},
       {Index: 10, Category: "Category 10"},
       {Index: 11, Category: "Category 11"},
       {Index: 12, Category: "Category 12"},
       {Index: 13, Category: "Category 13"}
   )
);

Set(currentCategoryIndex, 1);
Set(currentCategory, LookUp(Categories, Index = currentCategoryIndex).Category)



If my response resolved your issue, please feel free to mark it as the solution by clicking "Accept as solution." This helps others find the answer more easily. If you found the content helpful in any other way, a "Thumbs Up" would be greatly appreciated. Thank you! 😁

@Giraldoj 

 

A couple questions:

 

1. Shouldn't the Executed code for the "Not Started" button look into a selected column in the SharePoint list for reference? Because I don't see that in your formula. The Column in Question is called "Completed Users" which is a basic People column which allows multiple choices (Users names). Not sure if that is messing things up. My experience in the past Indicated that it does support .displayname. It for some reason does not like the "<> User.Displayname". And do you think it would make more sense to use the Office365.Users.MyProfile instead of just "User" here. Just wondering since the People column does utilize Office365 net.

 

2. The "Category" Column is a choice column so I'm Using the .Value at the end, otherwise it won't take it.

 

3. Ok, the "New" button is working. Just wasn't seeing anything due to the categories.

Hi @ShadowTech 

 

1. Oh yes you are correct in my sample formula "User.DisplayName" is the name of my datasource column and the name property, in your datasource can be "Completed Users.DisplayName" or any attribute you are able to extract from data people column.

Regarding to use User.Displayname or Office365.Users.MyProfile that depends a lot on your set up, for example if your Power Platform environment is connected and synchronized with Azure AD or Office365 both formulas should give you the same outcome.

but if your Power Platform environment is not connected to Azure. Names in systemuser tables could be different and will be more effective to use Office365Users.MyProfile().DisplayName

do some testing, check which one has the same name that your datasoruce column, in my case User().FullName is the match

Giraldoj_0-1719964247908.png

You will need to figure out that part because i cannot replicate your exact SharePoint and Office 365 structure 😅

 

2. If "Category" its a choice column, you need to perform some additional steps, It took me some time to figure out how to do it but here it is.

You can use the Choices function to get the possible values for the choice column and then cycle through them. Here's an example of how to do it:


first you need to include this in your onload, to create an array with all the choices and assign them and Index so we can increase the category later.

 

Set(categoryChoices, Choices('Category (Ventas)'));
Set(currentCategoryIndex, 1);
Set(currentCategory, First(categoryChoices).Value);

 

 

Now your right arrow code should change to 

 

Set(currentCategoryIndex, If(currentCategoryIndex < CountRows(categoryChoices), currentCategoryIndex + 1, 1));
Set(currentCategory, First(LastN(categoryChoices, currentCategoryIndex)).Value);

 

 

And your left arrow to

 

Set(currentCategoryIndex, If(currentCategoryIndex > 1, currentCategoryIndex - 1, CountRows(categoryChoices)));
Set(currentCategory, First(LastN(categoryChoices, currentCategoryIndex)).Value);

 

 

And now filters should be 

Category = currentCategory or Category.Value = currentCategory depending of your datasource.

3. Wonderfull!

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (2,257)