Filter between Combobox in PowerApps - sharepoint

I create an application with powerapps, and i need to filter between 3 combobox "Country" " Project" and "Contract" enter image description here. Like you can see in the picture. I want to display the projects associated with the chosen country & Contract, and the sae thing for the 3 combobox. How can i do this please ?
And i have another question, is it necessary that the 3 columns must be in the same sharepoint list so that I can filter between them ?
Thank you !!

To filter with multiple combobox:
Filter('galleryName',combobox.selected.value='columnName',combobox2.selected.value='columnName2',combobox3.selected.value='columnName3')
Please be carefull about the type of the values..
If you want to filter between columns that are not in the same List you can using the function AddColumns()..Search it in the documents, if you have problems please tell me.
Have a good day!

In this case gallery shows only records that match in all comboboxes
Filter('GalleryName',
'columnCounty'= ComboboxCountry.Selected.Value
&& 'colunmPorject'= ComboBoxProject.Selected.Value
&& 'ColunmContract'=ComboBoxProject.Selected.Value
)
With code below the gallery shows all the records that match, for example if ComboboxCountry and ComboboxContract are empty, all the projects that match in ComboboxProject are shown
Filter('GalleryName',
StartsWith('columnCounty', ComboboxCountry.Selected.Value)
&& StartsWith('colunmPorject', ComboBoxProject.Selected.Value)
&& StartsWith('ColunmContract', ComboBoxProject.Selected.Value)
)

Related

Powerapps - Filter dropdown items based on multiple columns in another list

I have a PowerApp that submits items to a SharePoint list (Let's call it ListA), I have a dropdown in the app ('FieldA1Dropdown') where the available selections need to come the 'MyItemNames' column from another SharePoint list (ListB), but I only want to see the items from ListB whose values in two other columns in match my conditions.
Specifically I only want to show the MyItemNames from ListB that are both active and transferrable.
I'm having a heck of a time sorting it out.
So the FieldA1Dropdown.Items property needs to be something like:
Filter(ListB.MyItemNames, ListB.Active.Value="Y", ListB.Transferrable.Value="Y")
But of course, this doesn't work.
I've already tried pulling in ListB's MyItems column by configuring FieldA1 as a Lookup field in Sharepoint, but you can't filter items based on other columns like I need to here.
Sidenote: Both ListA and ListB are already set up as data sources in this PowerApp.
Please advise.
Try as following to show MyItemNames from listB only when Active = "Y" and Transferrable="Y":
Distinct(Filter(ListB, Active = "Y" && Transferrable="Y"),MyItemNames)
I was able to solve my issue using the following setup.
Using the example names from my initial question:
In SharePoint, start with going the 'traditional' route and configure your FieldA1 as a lookup field connected to ListB's 'MyItemNames' column.
Then set your Field1ADropdown.Items Property to the following:
Filter(Choices([#'ListA'].'FieldA1'),LookUp(ListB,MyItemNames=Value,Active)="Y",LookUp(ListB,MyItemNames=Value,Transferrable)="Y")
You'll get a delegation warning, but as long as ListB is under 500 items you'll be fine.

Dynamic listing of drop-down list in Smartsheet using python API

I want to populate the drop-down list in a smartsheet from data in a column of another smartsheet. Is it possible? Do I need cross sheet referencing for it ? How do I access the drop-down list?
First read the source sheet, remove blanks, duplicate, and wrong data. then to edit a drop down list column you'll have to edit the options : https://smartsheet-platform.github.io/api-docs/?python#update-column
Note : The company I am working for is selling an automation to automaticly perform such requirements : https://smarterbusinessprocesses.com/smartercontrols4smartsheet-dropdown-list-manager-one-to-many/ .

PowerApps - Gallery Filter by all values in multiline text input - Delegation Error

I am trying to create a simple CRUD app for my teams to create, View & update records in a SharePoint List.
I am fairly new to powerapps and don't know much about bypassing delegation queries/errors.
I am stuck at creating a view/update screen. I have a Multiline Text Input that the users will input multiple unique package numbers. The idea is that the gallery should filter the records from the SharePoint List matching the package reference numbers in the multiline text box. The user can then select all and update a status by clicking a button.
As seen in the image above, I want the gallery to be filtered for only the Brand Package Reference that are in the Multiline Text Search Box.
I tried to create a collection of the ref nos in the search box with the below formula.
ClearCollect(FilterList,{RefNos: Split(Substitute(TextInput2.Text," ",","),",")})
Then tried a filter function with a ForAll as below. But this didn't work. It gave me a delegation error.
ForAll('Lost Packages Log', Filter('Lost Packages Log',FilterList.RefNos = 'Brand Package Reference'))
Can someone please help me create a formula that would help me achieve my goal.
Sounds like you have two issues:
Delgation
Filter a column by multiple values in a text box.
To get around the delegation errors, you need to keep the dataset below 2k records (assuming you set max records to 2000 in File/Settings/Advanced Settings/Data row limit...).
One way to do this is to create a collection of records OnVisible of the screen, that will always be below 2k.
Example:
ClearCollect(colRecords,
Filter(yourSharepointList,
StartsWith(status, "urgent")
)
)
The StartsWith() function works on text columns and is delegable to Sharepoint. Once you get your record count under 2k at all times, you can address the multi-line filter.
This will filter the gallery by items entered in the search box:
Set the Gallery Items property to:
If(
IsBlank(TextInput1.Text),
colSample,
Filter(
colSample,
packingNumber exactin Split(
TextInput1.Text,
Char(10)
).Result
)
)
Loosely translated:
If the search box is blank, show all records.
Otherwise, filter the collection of records where the packingNumber is exactly in the results of splitting the text box by newline characters.
Results in:
(here is a sample app though the hosting service will only serve it up for 30 days)

Making Data Validation List Searchable

I need some help making a data validation list easier to search/use. I have about 600 supplier names in my data validation list and it makes it really tedious to have to scroll down to find the right one in alphabetical order. Is there any way to make the list searchable? Also, if possible to make searchable it needs to be searchable in each individual cell as a new record is added almost every day with the supplier name (selected from the drop down list) and some other information. I have tried a combo box but it doesn't seem to work or I'm not doing it right. Any suggestions would be much appreciated. Thank you!
Use an ActiveX combo box and make sure the property MatchEntry is either 0 (match first letter) or 1 (match complete word).
Here is an answer to create a custom UserForm which allows you to search a long list of items:
Auto-Complete with only text and not numbers ComboBox Excel VBA
The following answer shows the possible implementation of a custom UserForm for data validation instead of the built-in data validation:
Multiple data validation criterias
So, if you combine the two you should have a working solution. Let me know if you need any further guidance.

SharePoint Web Parts can not be connected via hyperlink fields

In short:
I'm trying to filter an XSLTListViewWebPart based on what is selected in another XSLTListViewWebPart. Using a String field as connection this is working fine. Using a hyperlink field no data is displayed.
In more detail:
I have two lists, say Accounts and Projects. Both have a hyperlink field accountURL.
All accounts have different accountURLs. Different projects can have the same value for accountURL. Both are displayed on a page using the XSLTListViewWebPart.
The simple goal is to filter the Projects list based on which item is selected in the Accounts list using the accountURL field. So I established a web part connection using the acountURL as a filter. Alas, when an item in the Accounts list is selected no items are showwn in the Projects list although I double checked that there are matching values.
When using a string field instead of a hyperlink field for accountURL everything works like a charm. Problem is, I need the hyperlink field.
Is this desired behaviour? Do you have any suggestions for a workaround?
(I already tried converting the hyperlink field to a string field via a calculated column which did not work out either.)
All was and is to be done in the web interface or SP-Designer. Coding a WSP is not an option for this problem. As I'm not quite familiar with the correct terminus technicus I use field and column interchangeably.
All help is greatly appreciated.
Ben
Someone on the Microsoft forum suggested the following workaround which does its job well:
Add a hidden text column to both lists.
Use a workflow which is triggered on item creation and update to copy the value of the hyperlink column to the hidden text column.
Connect both webparts using the hidden column as filter.
Nonetheless, I still wonder whether it is possible to use hyperlink columns or other special columns for filtering. I also had the problem that I cannot use a person column as lookup.
Does anyone know if whether there ist some kind of overview
which column types can be used for filtering/formulas/lookup/...?
Cheers,
Ben

Resources