70
Views
5
Comments
How to add new value to datatype identifier
Question
I am trying to add 1 to Id entity attribute of CAR table
GetCARIdNumber.List.Current.CARMaster.Id + 1

in above step It throwing the error
Incompatible data type  in + operator


Please help me out

Thanks,
Poonam
UserImage.jpg
Rui Branco
Hi Poonam,  

This error is because you are trying to do an operation with a Identifier and a numeric value. You have do to something like this:
GetCARIdNumber.List.Current.CARMaster.Id + IntegerToIdentityRefInteger(1)

Regards,
Rui Branco
2012-03-16 12-21-09
João Rosado
Staff
Hi Poonam,

Use: EntityRefIntegerToInteger(GetCARIdNumber.List.Current.CARMaster.Id) + 1
And if you need to assign it back to the record: IntegerToEntityRefInteger(EntityRefIntegerToInteger(GetCARIdNumber.List.Current.CARMaster.Id) + 1)

Rui: your solution also causes the same error. Since it complains it cannot use the + operator between 'CarMaster Identifier' and 'Entity Reference (Integer)'

Regards,
João Rosado
UserImage.jpg
Rui Branco
You're right, João

Your solution is the correct way to solve the problem. With the rush of wanting to help, i just give solution with the same problem. :)

Sorry for that.

Regards,
Rui Branco
UserImage.jpg
Syeda Muhammad Arika Masroor

Hi João ,

I can't find this function. It is giving me error function not found. Can you help me with this?

2012-03-16 12-21-09
João Rosado
Staff

Hi Syeda,


Quite the old post you found here :)

The functions that were named "EntityRef" are were in the meanwhile renamed to "Identifier".

So for example "IntegerToEntityRefInteger" is now named "IntegerToIdentifier"
and "EntityRefIntegerToInteger" is now "IdentifierToInteger".


You can find the full list under Data Conversion in the expression editor:

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.