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 :
Finance | Project Operations, Human Resources, ...
Answered

How to Change valueStr operator

(0) ShareShare
ReportReport
Posted on by 5
  1. Hi, I have a question, I would like to know if you can help me.

Right now I'm sending data from a Form to a table using X ++ code, but I have a problem, for example with a string type field it would be something like * NameBox.valueStr (); * but the field I want to take the value would be in this case a Real type and I do not know how to take the value of a real type field, or if there is any way to change that valueStr to valueReal or Int, depending on the type of field that is used

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

    valueStr() is a method, not an operator.

    FormRealControl class has realValue() method, FormIntControl has value().

    By the way, I don't use valueStr() with string fields either - I prefex text() method.

  • ergun sahin Profile Picture
    8,826 Moderator on at

    If you need a more dynamic structure, you can check the Global::formControlValue method

  • Caracas Profile Picture
    5 on at

    thanks bro, i'm new to ax and it cost me a bit.

    Another thing, how would the syntax for a blank field be, to make a condition that the user must fill in the text field compulsorily?

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

    If your question ("How to Change valueStr operator") has been answered, please don't forget to mark the verified answer (by Did this answer your question > Yes).

    If you have another question, feel free to create a new thread (with an apropriate title a tags). By the way, tell us there if you're talking about an unbound control or a control bound to datasource field.

  • Caracas Profile Picture
    5 on at

    thanks bro, i'm new to ax and it cost me a bit.

    Another thing, how would the syntax for a blank field be, to make a condition that the user must fill in the text field compulsorily

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans