When using a lookup column in SharePoint Online, can you edit in both directions? - sharepoint

Can you edit the master list by updating the linked field, or must you always edit the master list and have the data cascade down?
For example, if the master list has "Clients" but is maintained by someone else and I find an error, can I update my lookup column "Clients" in my list and have it update the master list as well? Or does the data only go one way?
(Sorry, new at this! thanks!)

The data in a lookup column connection only goes one way. The field values are being pulled from the master list to display in the lookup column(s) on the child list.
There is the option of adding on the master list another lookup column that connects to the corresponding lookup column on the child list, but this will just give you the count of related items in the child list.

Related

How do I use a power apps form for a lookup column?

I have a SharePoint List (say "List-A") with plenty of columns, some of which are lookup columns.
These are just used to construct a choice columns, where the items in the choice drop down are the items of a column in a different List ("List-B").
I have used the function on SharePoint to integrate List-A with Power Apps Form. This creates a Power Apps form that is readily available.
For the Lookup choice columns, I have added List-B as the data source, and am using the items from the correct column as items in the choice that is linked to the lookup column. This correctly populates the drop down menu as expected.
Now when I publish this form and fill it from sharepoint (it pops up as it should hafter clicking New in the List view) I can fill the entire form and submit with no issue. However all the lookup columns remain blank, as if the form returned a null value instead of the selected.
I have both datasources set up:
The update property of the datacard connecting to the SharePoint List is equal to the Selected of the datacard containing the combobox (combobox is called DataCardValue43).
The items property of the combobox is equal to the correct column of List-B.
As an alternative solution, I have attempted to make a different column that is just one line of text. For this column, I have made a combobox once again setting the items property to the column in List-B. The intention was to return the selected value as a string. It was attempted thus:
where combobox1 once again manages to give the correct options in the drop down box but returns only Null.
To study it further, I have made a power apps flow that takes Create New Sharepoint List object as input. Here I see that the values are indeed Null
The one called "Return" is the text column that I made, and the other being the lookup column. I do notice that the Lookup column isn't called Value, but id. I don't know what to do with that information though.
I really just want to have a column in my power apps form that lets you choose and the choices are values from a column in a different List. What do I do, and why doesn't what I've already done work?
Thank you.
Please follow the steps below to solve the issue.
1: Add a Lookup column in SharePoint List.
2: Open that list in Power Apps by using the Customise Forms Option From SharePoint.
3: The Item property of Lookup field will be by default as follow:
Choices([#'CustomisingSharePointList'].LookupColumnListName)
4: There is no need to change/delete the lookup field with any custom dropdown or combo box. This is the point, where you are doing mistake by adding a custom combobox and replacing the original Lookup dropdown. If you want to change datasource, apply filter or sort the data, you can do all these thing to the same original lookup column.
e.g I have applied filter and sort functions to the existing data:
Sort(Filter(Choices([#'CustomisingSharePointList'].'LookupColumnListName'), Value in Filter(LookupColumnListDataSoure,Progress.Value = "Open").ID),Id)
5: When you will publish the list, it will work fine.
Note:
CustomisingSharePointList: List in which we have added a lookup column.
LookupColumnListName: List to which the lookup column actually belongs to.
LookupColumnListDataSoure: You need to add the original list as data source in power apps to use the above filter. This step is optional and applicable only if you apply filter like I did in step 4

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.

Infopath: Include data for active form only is grayed out

Here's my workflow:
An item gets added in a Sharepoint List (Say x). At that moment, a workflow triggers and starts a data collection task. For this task there is an Infopath fom which needs to collect some data from the user
This form has some fields which are to be fetched from the corresponding Sharepoint list item in list X and displayed in the form
I am trying to setup a data connection with the list X and fetching the fields of my interest.
However, the option "Include data for active form only" while setting up the connection is grayed out.
I am not able to get the right results in the form from the data connection, the data is not being returned for the right SharepointList item. THe data being returned is for the first item in list X.
Thanks!
This is because you are not passing a filter into the data connection. You are querying the list without an ID and since you are not selecting a specific list item it is just returning data from the first list item every time.
You are going to need to select a unique identifier and filter your result by clicking the add filter button and setting the foreign key = to primary key in list x. A quick google search of add filter to data in info path should give you an idea of what I am describing.
You may need to add a column in your initial table that imports the key from list x as a foreign key in your initial list.

Sharepoint LookUp field on Choice field?

How to create a lookup field for the Choice field..For eg: In a list i have Choice field and i have to create an lookup column in other list pointing to this choice field ..When i select this list this column is not appearing in the dropdown...Please let me know if there is any Limitation for that
It is not possible to create a lookup field for a choice (dropdown) field. There are two ways to resolve your problem: The programmatic approach and the workaround.
The programmatic approach involves an creating event receiver to do the magic - pretty work intensive. But there is an explanation here:
Sharepoint 2010 - How to use List Events to Set a Column's Value using Visual Studio 2010 (C#)
You can also just create another list, containing your choice field values and use a calculated field as a source for your lookup column. Check out the following explanation:
Using a lookup field on a choice field workaround
the programmatical Solution is at risk to run into an endless recursion:
The ItemAdded Event and UpdatedEvents are asynchrone. This means, that the command: this.EventFireingEnabled = false is not threadsafe. After systemUpdate you set EventFireingEnabled to true.
But because the ItemUpdated is asynchronus, you cannot guarantee, that the ItemUpdated for your system.update has already been called at this time!.
You can use calculated column is source list, that will display value of Choice column. Then you can add lookup column for this calculated field. It will work only for Choice column with single selection. For multiple selection you can use 3rd party components like that:
http://www.sparqube.com/SharePoint-Lookup-Column
It works out of the box for me... but the lookup option is is only available if you go to "List Settings" and click on "Create Column"
here is how I configured my column on sharepoint online (in 2019) and it works perfectly... this is copy and pasted from the list settings screen under this column...
Column name: Equipment List
The type of information in this column is: Lookup
Get information from: Equipment Master List
In this column: "Equipment Name" (dropdown selector of all the column names on the other list)
Allow multiple values (to be selected) [TICKED]
there are some notes lower down too..
Relationship
A lookup column establishes a relationship between list items in this list and related items in the target list. Specify the relationship behavior enforced by this lookup column when a list item in the target list is deleted.
When an item in the target list is deleted, cascade delete will delete all related items in this list. Restrict delete will prevent the deletion of an item in the target list if it has one or more related items in this list.
Enforce relationship behavior [CHECKBOX]
radio buttions:
Restrict delete
Cascade delete

Joining sharepoint 2007 lists in a web view based on a common key field

So - I'm making a data view that is to contain a list. This list has a field that will be used to match up against two other lists. If there is an entry for this value, it should show the value from the other list, otherwise show a link to add a new one.
So, what I need to do is make a data source consisting of the rows from list 1, and fill in the Ticket field with a value from the Tickets table matching the ID value from list 1. The same should be done for the Change Type field.
Can anyone point me in the right direction to accomplish this? I've found a few tutorials, but they seem to be for showing all the data together and not match up on any specific columns for linkage.
Thank you
What you are aiming at is not available in SharePoint out of the box.
There are two approaches you can look at:
Create your own custom lookup field template for single/multiple field
selection with some sort of field
editor. Create your own controls and
program the associated code behind
logic.
Use some existing custom solutions. One such sample is on codeplex:
SharePoint Filtered Lookup Field

Resources