Dear all,
I have created a lookup column (name: Testing2) in the SharePoint list that looks for values in the other SharePoint list. This lookup column field was added to the Canvas app, and I modified its Items function to depend on another field's value:
(Items =
Sort(
Filter(
AdditionalSPList,
Factory = cmb_Name.Selected.Result
).Material,
Ascending
)
The update function was unchanged: DataCardValue14.Selected
With this configuration, the selected item in the Canvas app field is not saved to the SharePoint. If leave Items function unmodified (original Items function is = Choices([@'MT'].Testing2), then the selected item is uploaded correctly.
Could someone please if it is possible to filter Items in the canvas app field and save the selected item to the SharePoint lookup column and how?
Solved! Go to Solution.
@Anonymous
If testing2 is a lookup column, then when you use Choices on that column for your items, you are really getting a table returned from that which has records with two columns - the Id of the record in the lookup list and the value of the record column from the lookup list.
When you give the formula you show to the Item, it will return a table with a single column called Material. When you go to update, then record schemas will not match and you will not get anything saved.
So, your formula also will not include the Id of the record...which is needed, so changing the Update of the datacard alone will not be helpful.
You can either change your Items formula to the following:
ForAll(
Sort(
Filter(AdditionalSPList,
Factory = cmb_Name.Selected.Result
),
Material
),
{Value: Material,
Id : ID
}
)
Note: this will return a table of records with a Value and Id (what is needed for a lookup column)
No other changes are needed.
OR, you can change the Items property to:
Sort(
Filter(AdditionalSPList,
Factory = cmb_Name.Selected.Result
),
Material
)
and then change your Update formula on the datacard to:
{
Value: DataCardValue14.Selected.Material,
Id : DataCardValue14.Selected.ID
}
This will provide a record with the correct schema for the lookup column.
I hope this is helpful for you.
@Anonymous
If testing2 is a lookup column, then when you use Choices on that column for your items, you are really getting a table returned from that which has records with two columns - the Id of the record in the lookup list and the value of the record column from the lookup list.
When you give the formula you show to the Item, it will return a table with a single column called Material. When you go to update, then record schemas will not match and you will not get anything saved.
So, your formula also will not include the Id of the record...which is needed, so changing the Update of the datacard alone will not be helpful.
You can either change your Items formula to the following:
ForAll(
Sort(
Filter(AdditionalSPList,
Factory = cmb_Name.Selected.Result
),
Material
),
{Value: Material,
Id : ID
}
)
Note: this will return a table of records with a Value and Id (what is needed for a lookup column)
No other changes are needed.
OR, you can change the Items property to:
Sort(
Filter(AdditionalSPList,
Factory = cmb_Name.Selected.Result
),
Material
)
and then change your Update formula on the datacard to:
{
Value: DataCardValue14.Selected.Material,
Id : DataCardValue14.Selected.ID
}
This will provide a record with the correct schema for the lookup column.
I hope this is helpful for you.
User | Count |
---|---|
257 | |
110 | |
90 | |
51 | |
44 |