I have uploaded data from excel into an entity, but it hasn't auto-populated the primary name fields. Although this is a required field, CDS for Apps has still accepted the upload.
How to I get it to generate this field when details are uploaded in the first instance?
HI @Caroline ,
Could you please share a bit more about your scenario?
How do you upload data from your Excel table to an CDS Entity?
Further, do you perform Primary Name field mapping when you import data from your Excel into your Entity?
I have made a test on my side, and don't have the issue that you mentioned. If I do not specify a column value from my Excel for the Primary Name field, when I perform "import", the following error would show up:
"The Primary Name field is a Required field"
In addition, you could also considert take a try with the "Open in Excel" functionality within CDS Entity to import your data from your Excel instead of "Get data from excel" option.
More details about the "Open in Excel" functionality in CDS Entity, please check the following article or blog:
Also please consider take a try with the alternative solution mentioned within the following thread:
Initially, I imported from excel, but it didn't import the data types, instead it set everything as text fields.
I then opened the entity in excel and populated the table using the excel add-in. That resolved the data type issue, but didn't populate the primary name field. This has happened in 5 seperate entities.
Opening in excel also seems to have an odd quirk if it hits an error, which it didn't do in the previous verson. It will highlight the row that's in error, as expected, but delete any new data that comes after the row, and re-order the data that was uploaded before it hit the error, so it's difficult to identify what data needs to be re-entered. If anyone has any ideas on that too, I'd be grateful!
I will try the PowerQuery option shortly...
@v-xida-msft Sorry I didn't get back to you on this one. It seems that I needed to set it to Autonumber, another change that I wasn't aware of since the upgrade.
However, this has now manifested another problem. It will autogenerate the Primary Name when I use the excel add-in, but not when adding a new record from the app itself.