Powerapps dropdown filter gallery sharepoint choice - sharepoint

How do I create a dropdown filter using a SharePoint choice list?
My dropdown isn't working in my Power Apps filter. I have a list in SharePoint with a choice field named status with the following options: "Awaiting Management Approval", "Rejected", and "Approved".
Within the Power Apps gallery, I want the gallery report to show all the information (title, name, etc) based on the status that is shown.
Example: I want show all the forms that have been approved and the information based off of this: Name of source in SharePoint = vltest.
I tried the following:
On the items of Dropdown1 to set it to choices(vltest.status)
On the items of the gallery to set it to Filter(vltest,Status.Value=Dropdown1.Selected.value)
Result: This didn't work and I got red x boxes on every single item based on the gallery filter.
I also tried the following:
Create a button: On select:
ClearCollect(
FilteredCollection,
Sort(
Filter(vltest, Status.Value = Dropdown1.Selected.Value),
/* ^ Dropdown1 represents the Dropdown control in your previous screen */
"Status".Value,
Ascending
)
),
Navigate(Screen2, ScreenTransition.Fade)
Dropdown1: choices(vltest.status) - Under screen 2, set the item to the gallery to Filtered Collection:

Related

Powerapps how to input into a people picker column in SharePoint

I have a PowerApps app that has a field that is supposed to feed into a people picker column in SharePoint online.
I have a data card for "Manager Name" ,which is a people picker column in SharePoint, the card contains a combo box.
The Combo box contains this information which allows it to search Office 365 and return a list of users. I can then choose the user from the list.
This is the information for the data card which should feed into the SharePoint column
I'm not sure what I need to put into "default" and "update" fields which I think is where the issue is arising.
I am fairly new to PowerApps so sorry if this is an obvious question
Assuming your Combobox is working and you are getting the users just fine, you could trt the following:
Default: ThisItem.'Your Column Name'
Update:
{
'#odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:First(ComboBox4.SelectedItems).Claims,
DisplayName:First(ComboBox4.SelectedItems).DisplayName,
Email:First(ComboBox4.SelectedItems).Email
}
Now, you might need to change the combobox DefaultSelectedItems conditionally (if the FormMode is New, Edit or View)
DefaultSelectedItems
Table({
'#odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: ThisItem.'Your Column Name'.Claims,
DisplayName:ThisItem.'Your Column Name'.DisplayName,
Email:ThisItem.'Your Column Name'.Email
})

Select item from website dropdown at random - puppeteer, nodeJS

I want to implement the feature to select from a dropdown menu on a website but I can't seem to be able to find the correct selector to query such that it selects a random item from the dropdown.
example of the dropdown I want to randomly select from
https://www.slamjam.com/en_GB/man/footwear/sneakers/low/nike-running/air-tailwind-79-sneakers/J166713.html
I can get it to click on the dropdown and bring the in-stock sizes but I can't get it to automate choosing a random item from the dropdown list.
In the past, I've been able to select from a Google Forms dropdown and a regular website that had basic dropdowns where I could choose the selector and the value with ease - but on this website, it doesn't seem that straight forward.
I want it to be able to just choose a random option from the dropdown if there are any available.
This code will select the first item that is not selected:
await page.waitForSelector('#select2-select-prenotation-container');
await page.click('#select2-select-prenotation-container');
await page.waitForSelector('.select2-results__option[aria-selected="false"]');
await page.click('.select2-results__option[aria-selected="false"]');
Keep in mind that there are many disabled items on that list.

How can I display results filtered by creator?

I am using SharePoint 2010 and am adding a data view web part to the DispForm page for a custom list. I want to be able to display a history of list items created by the user (NOT currently logged in user). Example:
"User A" adds a new help desk ticket
"User B" views the list item and sees a DVWP that is filtered to display only the results from the list item's creator
Can I do this dynamically using the "created by" field? How would I filter this so that it displays all items created in this list by "created by"? This is for a help desk system I am developing. Essentially I just want to be able to filter based on the list item's creator.
There will be multiple users who will be adding the ticket.
In the dataview properties you have options to display a toolbar over the dataview web part. There are options to Filter,Sort and Group.
Alternatively you can Sort and Group the dataview in SPD based on 'Created By' field. I think this should be the way to do it. The User B should be able to view all tickets grouped by 'Created By' field.
Thanks!

Limit editing to specific fields in a SharePoint 2010 list

I am wanting to allow limited editing of a SharePoint 2010 list item, to allow only editing of a few fields, depending on data in another sharepoint list. I have two lists:
Stock
=====
Stock Item Maximum Stock Level Current Stock Level
---------- ------------------- -------------------
My Item 100 10
My Item 2 200 25
Permissions
===========
Stock Item (lookup) Users (person, multiple)
------------------- ------------------------
My Item User 1
My Item 2 User 2
When 'User 1' clicks on My Item, 'Edit Item' is disabled (since they are in a custom group 'Stock Updaters'). I then want another icon in the ribbon 'Update Stock', which they click on and a form shows that allows them to edit the current stock level only. When they view 'My Item 2', either 'Update Stock' is disabled, or it just shows a view stating they don't have access to update the data.
How can I implement this, using InfoPath 2010? If they need to have contribute rights to update the data, is there a way of preventing this (unless they are an admin), or the prevent the edit form being shown (perhaps through workflows, showing a different form instead)?
Have you explored custom list forms? That will give you control to execute custom rules and enable/disable fields based on whatever rules you have.

Content Query WebPart - Grouping by custom column?

We have a LIST of web pages that we use as News items on our Sharepoint 2007 site.
On our main page, we have a Content Query WebPart that queries this list, and nicely displays the name, and a few lines of the content. This is taken from our Pages Library that was created as part of our Publishing Template.
We would like to "Group" items by categoriezing them (Top Stories, Location-Specific Events, etc) and show them using the Content Query WebPart.
We have created a custom column called "News Category" and we would like to group the items inside the Content Query WebPart by this. Unfortunately the Custom Column doesn't show up when sorting through the "Group By" fields..
Is this at all possible, or am I wasting my time? We are not looking to add 3rd party components to our site at this time...
I believe you need to create a Site Column instead of a custom column within the list. You would then need to add that site column to your list. Here's how:
Select Site Actions->Site Settings.
In the Galleries column, select "Site Columns"
Click "Create"
Enter in the relevant information.
In your list, goto Settings -> List Settings.
Select "Add from existing site columns"
Add your column to the list.
In your list, add data to the column as needed.
Back on the page showing your CQWP, modify the shared part.
Select Presentation. Under Group items by, select your site column.
You need to change the CommonViewFields property of your CQWP

Resources