Hi,
I've tried to collect some data in a editable grid, I have 2 lookup column in my dataverse that I use in my grid. My problem is that I can't collect the data modified in the grid.
I use that as a formula:
If(
ThisItem.'CRM - Commande' in colTaskUpdatesCommande.'CRM - Commande';
Update(
colTaskUpdatesCommande;
LookUp(
colTaskUpdatesCommande;
'CRM - Commande' = ThisItem.'CRM - Commande');
{
}
);
Collect(
colTaskUpdatesCommande;
{
Client: DropdownCanvas1.Selected;
Commande: TextInputCanvas1.Value;
'Date de commande': DatePickerCanvas1.Value;
'Description commande': TextInputCanvas1_1.Value;
'Condition de facturation': DropdownCanvas1_1.Selected;
'CRM - Commande': ThisItem.'CRM - Commande'
}
)
If someone can help me it would be appreciated.
Thanks,
Tom Victor
Hi @TomVictor ,
Your Lookup code will is showing error because you are comparing Text and Record datatype
//Code will be
LookUp( 'CRM - Client'; Client = combobox7.Selected.Client; ThisRecord)
Please ensure brackets and datatypes are proper for this to work
Hi @TomVictor ,
Can you share a screenshot of the error and the part where it is highlight?
Just to make the format clear, here's what I implemented long ago which works without issue:
Hi @Ethan_R
Thanks for your reply, it doesn't seems to work for me, I cannot compare the first part of your formula. It says that I can't compare a Text with a Record
Hi @TomVictor ,
Just check if you have ',' commas as separator or ';' semi-colon.
I use commas so I wrote the code:
If(
ThisItem.'CRM - Commande' in colTaskUpdatesCommande.'CRM - Commande',
Update(
colTaskUpdatesCommande,
LookUp(
colTaskUpdatesCommande;
'CRM - Commande' = ThisItem.'CRM - Commande'
),
{
Client: LookUp(
Clients,
ClientID = DropdownCanvas1.Selected.ID,
ThisRecord
),
Commande: TextInputCanvas1.Value,
'Date de commande': DatePickerCanvas1.Value,
'Description commande': TextInputCanvas1_1.Value,
'Condition de facturation': DropdownCanvas1_1.Selected
}
),
Collect
(
colTaskUpdatesCommande;
{
Client: LookUp(
Clients,
ClientID = DropdownCanvas1.Selected.ID,
ThisRecord
),
Commande: TextInputCanvas1.Value,
'Date de commande': DatePickerCanvas1.Value,
'Description commande': TextInputCanvas1_1.Value,
'Condition de facturation': DropdownCanvas1_1.Selected,
'CRM - Commande': ThisItem.'CRM - Commande'
}
)
)
Considering that Client is lookup value, you need to capture the record completely instead of just dropdown.selected. As it sometimes doesn't update values properly when working on large datasets.
Hope this helps
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional