Notice: Trying to get property 'post_parent' of non-object in /var/www/html/community/wp-content/plugins/buddyboss-platform/bp-forums/functions.php on line 841
Changing number formats in text boxes - Omnis General Forum - Omnis Forum

Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Changing number formats in text boxes

  • Changing number formats in text boxes

    Posted by Allan Sullivan on November 7, 2022 at 7:31 pm

    I have a coding question related to a web application.

    My team is trying to make a numeric input field language/location specific. Meaning a number like 1234.56 can appear as either:

    1,234.56 or 1 234,56

    (Depending on the location/language)

    In the component properties the numberformat is “%.2F” (which works for one of the needed formats). How can I get it to use the second format?

    I have attempted to use the following code in the constructor:

    Do $ctask.$objs.MY_TEXT_FIELD.$numberformat.$assign(“% ,2F”)

    but it doesn’t seem to work.

    Can I actually assign the number format like this at runtime? And if so, what would the format be for the second number format I specified?

    Gav replied 2 weeks, 5 days ago 3 Members · 3 Replies
  • 3 Replies

Notice: Trying to get property 'post_parent' of non-object in /var/www/html/community/wp-content/plugins/buddyboss-platform/bp-forums/functions.php on line 841
  • Dr. Robert-Andreas Schöning

    Member
    November 7, 2022 at 10:52 pm

    Hi Allan

    Are you sure you were using the notation starting with

    Do $ctask.$objs?

    To address fields in a remote form you should use $cinst.$objs instead , as the the other one addresses the remote task.

    Regards

    Robert

  • Allan Sullivan

    Member
    November 8, 2022 at 3:50 am

    Yes, you are right, it was $cinst.$objs in the code. (My mistake in my earlier post here… 2 adjacent lines and I messed up the copy/paste.

    So the line is:

    Do $cinst.$objs.MY_TEXT_FIELD.$numberformat.$assign(“%.2F”)

  • Gav

    Member
    November 8, 2022 at 9:51 am

    Hi @segno

    I wonder if this is a property of the browser, rather than the application. Whilst we can tell Omnis that we want commas and decimal points, this might get re-interpreted by the browser language setting. See here: https://support.google.com/looker-studio/thread/9967878?msgid=9969173

    Rgds,
    Gav

Log in to reply.