Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Invalid argument type GUID for tablename



I have created 2 practically identical entities in PowerApps. These two entities both have one field each for a calender date, booking type and number field. Though we want the same design for both entities when adding new records, I have created identical forms for both entities including these three fields for each source. The problem is, that even though both entities are almost exactly the same and I use the three fields that are practically identical, the table reference in powerApps is different. For the first source, everything works fine,  I can add a formula for the dropdown in the Data Items field in advanced view to "Distinct('Tablename', 'columnname'). And for the card the formula for AllowedValues "DataSourceInfo('Tablename', DataSourceInfo.AllowedValues, "Columnname")" works perfectly. For my other source however, i get the error "Invalid argument type GUID" when adding both of these formulas. The formulas are accepted however, if I change the formulas to "Distinct([@Tablename], 'columnname') and "DataSourceInfo([@Tablename], DataSourceInfo.AllowedValues, "Columnname")". Why is this? And what does it mean when [@] is used for a table name expression? Because the add new records function does not work properly for the second source where I have to set it to [@Tablename].


Se attached pictures.

Level: Powered On

Re: Invalid argument type GUID for tablename

This might be good for others to know. It seems like something must have happened to the DataField name, the name had somehow been cut off. Somehow the app maneged to update the field in the entity even though the DataField was wrong, however it updated the field with the default value. When correcting the DataField name it works properly to add new records, however I still need to set the formulas with the @Tablename expression. Why does source 2 have to behave like that? I would appreciate if someone could explain it to me. But the app is at least registering new records correctly now. But the question still remains, why 2 almost identical sources has to be set differently in formulas, hopefully someone else have encountered this as well.