Angular 14 how to format number input in ibm carbon number input with commas - angular14

I am using Angular14 with ibm carbon design system.
<ibm-number
[label]="label"
[helperText]="[helperText]"
[theme]="theme"
[min]="min"
[max]="max"
[step]="step"
[precision]="precision"
[invalid]="invalid"
[invalidText]="invalidText"
[warn]="warn"
[warnText]="warnText"
[size]="size"
[disabled]="disabled">
</ibm-number>
for eg: want to display a number as : 123,123,123
I would like to format the number with comma separated after 3 numbers. Couldnt find any documentation in ibm. Is there a way in angular with custom directives we can format this number input with comma separated?
Can anyone please help me with this to show how to achieve this?
Thanks

Related

Big Query - extract json field which contains emoji?

In my BQ database table I have a column called payload which contains raw facebook webhooks JSON payloads as string. One of them contains a text with an emoji like Sample 🏦. In big query it look like
{"object":"page","entry":[{"id":"xxxx","time":1602757469275,"messaging":[{"sender":{"id":"xxxx"},"recipient":{"id":"xxxx"},"timestamp":1602757469062,"message":{"mid":"m_xxxx","text":"Sample \ud83c\udfe6","quick_reply":{"payload":"{\"key\": \"value\"}"},"tags":{"source":"source"}}}]}]}
I would like to create a view with a column text with extracted text field value from the raw json. I created an sql like
SELECT
JSON_EXTRACT_SCALAR(payload, '$.entry[0].messaging[0].message.text') as text,
FROM `my_table.facebook.webhook_received`
Sadly the result I get looks like that Sample ��
Does anyone know how to make big query decode the emoji properly or at least just not change it to those � signs ?
Those characters you have embedded are not for a bank icon which is your issue I believe.
Run the following in BQ and it returns the desired emoji:
select " Sample \U0001f3e6"
Ref:https://emojipedia.org/bank/
The two you have provided seem to default to the '?', invalid character
http://unicode.scarfboy.com/?s=U%2Bdfe6
edit: what ever is handling the message maybe throwing the encodings you're seeing in your message which may be the actual problem.
If you are using BigQuery Python client and its load_table_from_json method, there is a Unicode bug (especially its byte is over 0xFFFF, like 🏦) in the previous version, and I have submitted this bug fix which is already included in the latest release include it, https://github.com/googleapis/python-bigquery/releases/tag/v2.24.0. By the way, you should use \U0001F3E6, not \ud83c\udfe6 (UTF-16 hex type) to present 🏦 in your Python code with BigQuery.
Unicode Character 'BANK': https://www.fileformat.info/info/unicode/char/1f3e6/index.htm,
https://charbase.com/1f3e6-unicode-bank

#Dblookup and formatting on web

I have been developing a web application using domino, therein I have dblookup-ing the field from notes client; Now, this is working fine but the format of value is missing while using on web.
For example in lotus notes client the field value format is as above
I am one, I am two, I am one , I am two, labbblallalalalalalalalalalalalalalalalalalaallllal
Labbbaalalalallalalalalalaalallaal
Hello there, labblalalallalalalllaalalalalalalalalalalalalalalalalalalalalalalala
Now when I retrieve the value of the field on web it seems it takes 2 immediate after 1. and so forth, I was expecting line feed here which is not happening.
The field above is multi valued field. Also on web I have used computed text which does db lookup from notes client.
Please help me what else could/alternate solution for this case.
Thanks
HD
Your multi-valued field has display options associated with it and the Notes client honors those. Obviously, your options are set up to display entries separated by newlines.
The computed text that you are using for the web does not have options like that and the field options are irrelevant because you aren't displaying the field. Your code has to insert the #Newlines. That's pretty easy because #DbLookup returns a list, and if you concatenate a list and a scalar, the scalar will be appended to each element of the list. (Look at the third example under "concatenation, pairwise" here to see what I mean.
The way you've worded your question is a little unclear to me, but what you need in your computed text formula is either something like this:
list := #DbLookup(etc,. etc.);
list + #Newline;
Or something like this:
multiValueFieldContainingListWithDbLookupResult + #NewLine;
I used #implode(Dblookupreturnedvalue;"");
thanks All :)

How to italicize text on watchOS 3 complication?

If you look at the calendar complication on watchOS 3, the second row of text below the date is italicized. I've searched the documentation high and low but can't find anything.
I'm using all three providers in CLKComplicationTemplateModularLargeStandardBody but all three rows of text are formatted with non-italicized text.
Is there a trick to making the third provider italicized?
It looks like italics is a form of data detectors - in this case addresses, so I don't think there's a public API for this.

Best way to format currency in Yii gridview with no decimals

Can Yii formatCurrency be used to format a currency value in cGridView with zero decimal places?
My current code is:
Yii::app()->locale->numberFormatter->'.'formatCurrency($data["'.$columnName.'"],Yii::app()->params->currency)
Which results in:
$50,000.00
And I want the result to be:
$50,000
Same problem discussed in Yii forum. Here I added some points. Please check the relevant link.
This is due to your locale currency settings. Go and check your YII framework folder/i18n/data you will fix the problem there... Find your locale and fix it.
In ii18n/Cnumberformatter.php
change line 162
$value=round($value,$format['maxDecimalDigits']);
to
$value=number_format($value,$format['maxDecimalDigits'],'.','');
refer this forum.
http://www.yiiframework.com/forum/index.php/topic/21002-formatcurrency-broken/

Validate a Single line of text column type of list in sharepoint 2010 to accept only numbers?

How to validate a Single line of text column type of list in sharepoint 2010 to enter accept only numbers?
Please don't tell me to use calculated column , I tried it and it didn't work for me as i want.
Please advice, thanks in advance.
This should work:
=ISNUMBER([MyColumn]+0)
Here is what seems to work for me (building on #Rob_Windsor; newlines added for readability):
=AND(
ISNUMBER(Number+0),
ISERR(FIND(".",Number)),
ISERR(FIND(",",Number)),
ISERR(FIND("$",Number)),
ISERR(FIND("+",Number)),
ISERR(FIND("-",Number)),
ISERR(FIND(" ",Number))
)
I went through the available functions and I don't see one that will validate whether a text value is a number.
BTW, is there a reason you are not using a Number field instead of a Single line of text?