HI,
I had made the editable gallery as like you but I followed Reza Durrani video
https://www.youtube.com/watch?v=wI6SHGQ9ATg
But I am unable to patch few combo box in SP list as that column is a single line text in sp and in powerapps its a combo box which have items coming from Dynamics table.
I am unable to write a patch statement for this column.
Gallery:
EMBDEC Combo
Items: ReleaseProdcuts (Dynamics Table) , Items (Value): 'Item Number'
DefaultSelectedItems: Table({Result: ThisItem.EMBDecorID}) (its shows as Table)
I am not able to patch the selected 'item number' in SP in a single text field
@eka24 @RandyHayes @StalinPonnusamy
Please help!!!
@MustH ,
Based on the values you have posted, if the Patch of
EMBDecorID: EMBDecCombo.Selected.'Item number'
is correct (which you have confirmed) AND
EMBRecordID is a Single Line of Text column in SharePoint AND
EMBDecCombo is a single selection then the DefaultSelectedItems would be
{'Item No': ThisItem.EMBDecorID}
as I have posted earlier.
@MustH ,
I certainly hope so - that is the correct syntax for a single select combo box DefaultSelectedItems if it is reading from a Text field.
@WarrenBelz
Well, there is one Problem, I think you are mistaken in understanding.
Well, I have a ComboBox in an Editable Gallery,
and the Items (DataSource) of the ComboBox is from the Dynamics Table ( ReleaseProducts).
and the Fields (Value) of the ComboBox from right properties I have chosen ( ItemNumber) which is the column of Dynamics Table.
Now, for The DefaultSelectedItems , I wanted to set it to the SharePoint List Text Column which is EMBDecorID
as ThisItem.EMBDecorID
But it says, Expected Table Value
How, can I set it defaults with respect to the text column of SharePoint?
Hi @WarrenBelz
The DefaultSelectedItems is showing as a record, will it be correct? when I load the gallery in View Mode? will it load the text from my Text Column into this Combo?
As I posted earlier
{'Item No': ThisItem.EMBDecorID}
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz THis Fixed the issue in Patch statement,
I have used
Patch( //Saving Data to SharePoint From Collection
ColGridData,
ThisItem,
{
SaleOrderLineSequence: SaleOrderLineSeq.Text,
EMBDecorID: EMBDecCombo.Selected.'Item number',
DecorationType: DecorTypeCombo.Selected,
NumOfLogos: Value(NumberOfLogosInput.Text),
StitchCount: StitchCountInput.Text
}
)
But, What should be in the DefaultSelectedItems ?
It gives error when I use ( ThisItem.EMBDecorID)
as my ComboBox values are from different DataSource.
What Should I set in DefaultSelectedItems in View Mode when the Gallery (Grid) is in View Mode?
@MustH ,
All you need is the output of the Combo Box (if it is a single selection) as this will be a Text value able to be written back to the Text field. I was guessing Result based on your posted code assuming it was a Distinct filter or Split() statement. It appears it is probably
EMBDecorID: EMBDecCombo.Selected.'Item No'
If you type in EMBDecCombo.Selected. (note second dot), the valid values will come up underneath.
I am also wondering why you have used Table() in the DefaultSelectedItems and have referred to Result here (based on the Items you have now posted). If the field displayed is 'Item No', it should just be
{'Item No': ThisItem.EMBDecorID}
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
@WarrenBelz
sorry, for late reply
Well, EMBDecorID is a single line text column in my sharepoint list.
and it's a Single Select Combo
I am using Editable Gallery and I have inserted a ComboBox as EMBDEC Combo
EMBDEC Combo
Items: ReleaseProdcuts (Dynamics Table), Items (Value): 'Item Number'
DefaultSelectedItems: Table({Result: ThisItem.EMBDecorID}) (its shows as Table)
When using Patch
I am not able to Save that Combo Selection into my Text column of SharePoint list
any Help!!
@MustH ,
Is this a single or multiple selection and what are the Items of the Combo Box ? What is the connection between EMBDecorID and 'Item No'
Yes @WarrenBelz
Your assumptions are correct, but the issue is in the
DefaultSelectedItems: Table({Result: ThisItem.EMBDecorID}) // This Data Type is a Table ( which I can't save it into SP)
kindly see my screenshots
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional