Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

How to Change valueStr operator

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

  • Caracas Profile Picture
    Caracas 5 on at
    RE: How to Change valueStr operator

    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
    Martin Dráb 225,610 Super User on at
    RE: How to Change valueStr operator

    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
    Caracas 5 on at
    RE: How to Change valueStr operator

    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?

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: How to Change valueStr operator

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

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: How to Change valueStr operator

    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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans