Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

str2int64 conversion

(0) ShareShare
ReportReport
Posted on by 55

Hi DAXers,

int64 myint64,;

myint64 = str2int64('test');

info("result : %1" ,myint64);

I am getting 0 in info dialogue.

Can anyone please help me

Thanks

  • Koti9999 Profile Picture
    55 on at
    RE: str2int64 conversion

    Thanks a lot Nikolos...as you suggested I have assigned recid..i am able get produnitid.

  • Verified answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Ax 2012 str2int64 conversion

    Looks like you want to get RecId (int64) of some record, but at the moment you have the natural key (string). You need to use "L1K1" to search for the corresponding record from the related table (if you don't know which table to go to, you will find the table by looking at relations of the table that you have in "production" variable). Once you find this record, assign it's RecId to your "resourceGroup" variable.

  • Martin Dráb Profile Picture
    233,305 Most Valuable Professional on at
    RE: Ax 2012 str2int64 conversion

    Again, L1K1 isn't a number, therefore the conversion is meaningless.

    What are you trying to achieve?

    Maybe it means that you have ProUnitId, which is a unique key of a table and you need RecId corresponding to this ID, but you str2int64() can't convert 'L1K1' to something like 67879890228. You'd need a query to database to obtain the additional piece of data.

  • Koti9999 Profile Picture
    55 on at
    RE: Ax 2012 str2int64 conversion

    Thanks for replying.. actually i have below scenario..

    int64 resourcegroup = str2int64(production.prounitid);

    Here produnitid is string,it will fill as 'L1K1'

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Ax 2012 str2int64 conversion

    What would you want to get as a result? What are you trying to do?

    You can't convert text to number. That's why you get zero.

    It's only possible to convert a string that contains numbers, such as "54".

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 185

#2
Martin Dráb Profile Picture

Martin Dráb 147 Most Valuable Professional

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 130 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans