web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

conpeek solutions

(0) ShareShare
ReportReport
Posted on by 1,559

Hi Friends,

I need to use conpeek to get data, but, the data could be string or numeric.

I would like to convert it to string, and don't want to use typeOf to check first, is there a better way to do it?

 

Many thanks,

River

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Why exactly you don't want to use a completely viable solution? How do you define "better"? You could use any2str(), but it's *not* better.

    I think you're just wasting time.

  • Ganriver1 Profile Picture
    1,559 on at

    Hi Martin,

    It's going to happen in a big loop, so, I worry about the typeOf method is going to have performance issue.

    But, sounds like any2str() probably will do same thing as typeOf.

  • Verified answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    No, I don't see any reason why it should cause performance issues.  Have you measured it?  If you did, what numbers did you found? If not, how do you know? Did you just randomly choose this function?

    Performance optimizations is a great thing, if it's actually used for what's slowing things down. Otherwise is everything from a waste of time to a cause of serious problems.

    If you want to avoid the type check at runtime, redesign your application so it doesn't need it.

  • Ganriver1 Profile Picture
    1,559 on at

    Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans