hello ,
Usually, I use sharepoint with power apps. To get the id of the last records that I add I use Form1.LastSubmit.ID, but in Dataverse return error with the same code, how do this?
Thanks
Hi @siforibo ,
You should just be able to use the name of the DataVerse table's Primary Column
Set(idreclamation, Form1.LastSubmit.primaryColumnName)
I notice in your above comment you have a semi-colon ";" in your Set statement, change it to a comma ",".
For testing, you can get rid of the Set statement. Just add a label to your app and for the text property, start typing
Form1.LastSubmit.
This will obviously only work after you have performed a SubmitForm(Form1).
Once you add that period, the formula bar should suggest to you all of the field names that are available to you, you can try them out until you get the one you want. Then you know the LastSubmit is working, and you can paste that into your Set statement.
The "variable type is not compatible with value types elsewhere in your application" just means that here you are trying to assign the variable with e.g. an integer but elsewhere you have assigned it e.g. a record. But don't worry about that too much until you have finished getting rid of the first problem.
I don't know where is the problème. I have ignored the problème with Manuel generation of code (when the user connect, I get the last number was added by this user and I wrote it with his id ex: iduser-Ascending number) and submit the record with this id.
I do some application with Dataverse it work normally, so I don't know really where is the problème
Hi @siforibo ,
Note: If you reload or launch app then the last submitted won't work, if you need last record been created then you have to make different query filter.
Now, coming on Last submitted value
Can you try the following please, I hope you get some data
Step 1: Insert a Data Table control on your Screen.
Step 2: In the Items property, simply add "Form1.LastSubmit" and wait to see your last submitted data.
Step 3: You can add more fields from the right panel property (in Fields) and based on Column Name, you can use correct way of getting value as Form1.LastSubmit.FieldName (If any conversion in type needed is later part)
Hope this helps
@Ethan_R ,
i do it :
Set(
idreclamation;
Form1.LastSubmit.'id-reclamation'
)
but it retun error "incompatible type. we cannot evaluate your form, Cal the context variable type is not compatible with value types elsewhere in your application"
Hi @siforibo ,
In dataverse Table, your table name will usually be unique identifier containing GUID.
So, let's say for example your Table name is Account then its primaryID field name is accountid
Try to find the fieldname that is similar to your Table Name (singular usually) is your ID value
Form1.LastSubmit.<FieldNameAsTableName>
Hope this helps
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1