Can anyone suggest how I can convert Number to Text in workflow. I want to print Invoice and want Total Amount to be printed as Text in the Output Invoice.
How about this expression?
TEXT([Total Amount])
@Fabian I think my question was not clear. I want if there is โ[Total Amount]=1000โ then i want this to be converted to โOne Thousandโ in word format. Can u suggest a solution for this. .
There is no built-in solution to meet your goal, and writing an expression to handle arbitrary values would be extremely complicated.
@tsg_despatch
Something like this?
Youโre free to take a copy of this app from my portfolio:
Portfolio URL: https://www.appsheet.com/portfolio/245151
App Name: Number2Text
Neat!!!
Thanks @Steve, appreciated.
Wow! Really very creative implementation @LeventK !
Cools Thanks @LeventK
Genius!
Teลekkรผrler elinize saฤlฤฑk
I try using this but give wrong text if number below 100
@Jkr_Ckmnt
Thanks bringing it to my attention. The glitch is now fixed.
@LeventK, t is a work of genius! Thank you
Thnx @Guy_Merlin_Dyangnou, my pleasure.
Impressive!!
What about until 1 billion?
May I know how to add cents?
Nice job
Question, if I have the "documents" table, with the fields
document id key
subtotal decimal
sub_total_word text "How can I get the conversion from the Number2Text table of the Textify field in this sub_total_word field?
Thank you very much Mr. LeventK.
I tried and tried to make it in Million (not only thousands), however always fail. Can you help me please?
@Bpinontoan
I have updated the app to textify numbers up to 999,999,999. Provided you have copied my app, please delete that app and copy the new one to see and adopt the changes.
Wowโฆ
Where and how can i get Or copy of the apps?
Thank you very much
TRANSLATION FEATURE ADDED
Also added the translation feature via Google Translate API in compliance with ISO-639-1 Code which supports 109 languages via NMT/PBMT model.
Whoa! Nice!
STANDALONE WEBHOOK
A couple of members had texted me that, they have copied the app but translation feature is not working Thatโs so normal, because the app is using a standalone webhook workflow. To make it working for you; there are a couple of steps that you shall follow:
1. You need to subscribe to Google Cloud
2. You need to activate Google Translate API and generate an API Key (check it here)
3. Create a Google Apps Script (you can copy the code below), make necessary changes as per your requirements and deploy the script as a WebApp. When deploying, you shall ensure that the webapp is deployed for use of Anyone, even anonymous. Take a note of the generated webapp URL, as you will need it for your AppSheet Webhook Workflow
THE CODE
var SHEETID = "Your Sheet ID here";
var SHEETNAME = "Your Sheet Name here where you want the translation to be recorded";
var TR_COL_INDEX = 7; // The column index (A=1) in your sheet for the translation record
var API_KEY = "Your API Key here";
Logger = BetterLog.useSpreadsheet(SHEETID);
function doPost(e) {
Logger.log("Number2Text Webhook triggered...");
var payload = JSON.parse(e.postData.contents);
var string = payload.InWords;
var target = payload.TargetL;
var rowNr = parseInt(payload.RowNr);
try {
var baseURL = "https://translation.googleapis.com/language/translate/v2?key=API_KEY";
var payload = {
"q" : string,
"source" : "en",
"target" : target,
"format" : "text"
}
var headers = {
'content-type': 'application/json'
}
var options = {
"method" : "post",
"payload" : JSON.stringify(payload),
"headers" : headers
};
var response = JSON.parse(UrlFetchApp.fetch(baseURL, options));
var trText = response.data.translations[0].translatedText;
SpreadsheetApp.openById(SHEETID).getSheetByName(SHEETNAME).getRange(rowNr, TR_COL_INDEX).setValue(trText);
Logger.log("Source Language: en"+"\nTarger Language: "+target+"\nString: "+string+"\nTranslation: "+trText);
return ContentService // return json success results
.createTextOutput(
JSON.stringify({"result":"success",
"data": JSON.stringify(payload) }))
.setMimeType(ContentService.MimeType.JSON);
} catch (e) {
MailApp.sendEmail("youremail@domain.com", "Webhook Error Occured!",
"\r\nMessage: " + e.message
+ "\r\nFile: " + e.fileName
+ "\r\nLine: " + e.lineNumber);
e = (typeof e === 'string') ? new Error(e) : e;
Logger.severe('%s: %s (line %s, file "%s"). Stack: "%s" . While processing %s.',e.name||'',
e.message||'', e.lineNumber||'', e.fileName||'', e.stack||'', processingMessage||'');
throw e;
}
}
APPSHEET WEBHOOK WORKFLOW
Hi mr. LeventK โฆ awesome your helps.
I am still waiting How to convert number to Text format in million (not just thousands).
From your appsโฆ i tried and tried to modify but always failโฆ
Could you help me?
Thank you and very appreciate,
Have you copied the latest app build? As I have updated the app to cover the number range up-to 999,999,999
I am sorryโฆ Copy from Where?
Finallyโฆ i got already.
Thank you and thank you very much Mr. LeventK.
Awesome!
@Bpinontoan
Youโre very welcome, my pleasure. Glad to hear that you figured it out.
I created a number-to-letter table list and used the lookup for reference. This method has many limitations but I am using it very simply and effectively for newbies.
Tiแปn | ฤแปc sแป |
---|---|
1000 | Mแปt nghรฌn ฤแปng |
2000 | Hai nghรฌn ฤแปng |
3000 | Ba nghรฌn ฤแปng |
4000 | Bแปn nghรฌn ฤแปng |
5000 | Nฤm nghรฌn ฤแปng |
6000 | Sรกu nghรฌn ฤแปng |
7000 | Bแบฃy nghรฌn ฤแปng |
8000 | Tรกm nghรฌn ฤแปng |
9000 | Chรญn nghรฌn ฤแปng |
10000 | Mฦฐแปi nghรฌn ฤแปng |
11000 | Mฦฐแปi mแปt nghรฌn ฤแปng |
12000 | Mฦฐแปi hai nghรฌn ฤแปng |
13000 | Mฦฐแปi ba nghรฌn ฤแปng |
14000 | Mฦฐแปi bแปn nghรฌn ฤแปng |
15000 | Mฦฐแปi nฤm nghรฌn ฤแปng |
16000 | Mฦฐแปi sรกu nghรฌn ฤแปng |
17000 | Mฦฐแปi bแบฃy nghรฌn ฤแปng |
18000 | Mฦฐแปi tรกm nghรฌn ฤแปng |
19000 | Mฦฐแปi chรญn nghรฌn ฤแปng |
20000 | Hai mฦฐฦกi nghรฌn ฤแปng |
โฆ
Ostras, que interesante!!! q idioma es?
this is Greate solution, sir,
I am trying to do some change to the Indian amount methods
where
one hundred thousand = 1 lakhs
millions become 10 lakhs
10 million become 1 crore.
100 million = 10 crore
working on it if possible then please provide some hints because expressions are very impressiove and longs. and i want to stop this ate 10 crores.
I have the exact requirement but don't have it implemented yet in AppSheet.
I am using a workaround as follows. Assume we need to get words in Indian Rupees for the column [Total].
1. Create an Action as follows to open a URL. Use the following formula:
CONCATENATE("https://num2word.com/?number=",[Total])
Example: https://num2word.com/?number=15177.20
2. Clicking this action will take you to a website and you'll have to copy the result into the desired field manually.
This is a semi-automation.
Hello guys!
A colleague recently asked me for this tool to transform prices into text in Portuguese (Brazil). Some grammar rules are different here besides the question of prices and not numbers.
I created an application that Iโm still testing but that apparently manages to correctly translate to PT-BR the price values โโentered with the name of the local currency (Reais / Centavos).
Iโll make it available here because I only found this forum through this colleague, so if any Brazilian looking for the same function will already be available here.
It translates numbers below 1 Billion and as it is a complex system to make the formulas were robust, but basically the app works as follows:
1- There are 2 tables, one with the names already recorded and a record of its positioning, another table where you enter the number you want to translate;
2- There is 1 virtual column to identify the size of this number and so we can separate it into Millions, thousands, hundreds and cents;
3- For each box there is 1 column that identifies the value and translates it including its end (million, million, thousand, reais, cents), each formula has between 118 and 61 lines;
4- Our last virtual column completes these values โโin the correct order.
Olรก pessoal!
Recentemente um colega me solicitou essa ferramenta para transformar preรงos em texto em Portuguรชs (Brasil). Algumas regras gramaticais sรฃo diferentes por aqui alรฉm da questรฃo de ser preรงos e nรฃo nรบmeros.
Criei um aplicativo que ainda estou testando mas que aparentemente consegue traduzir corretamente para PT-BR os valores de preรงo inseridos junto ao nome da moeda local (Reais / Centavos).
Vou disponibilizรก-lo aqui pois sรณ encontrei esse fรณrum atravรฉz desse colega, entรฃo caso algum Brasileiro procure pela mesma funรงรฃo jรก estarรก aqui disponรญvel.
Ele traduz nรบmeros abaixo de 1 Bilhรฃo e como รฉ um sistema complexo de se fazer as fรณrmulas ficaram robustas, mas basicamente o app funciona da seguinte maneira:
1- Existem 2 tabelas, uma com os nomes jรก gravados e um registro do posicionamento dele, outra tabela onde vocรช insere o nรบmero que deseja traduzir;
2- Existe1 coluna virtual para identificar o tamanho desse nรบmero e assim podemos separรก-lo em Milhรฃo, milhar, centenas e centavos;
3- Para cada casa existe 1 coluna que identifica o valor e o traduz incluindo seu final (milhรฃo, milhรตes, mil, reais, centavos), cada fรณrmula possui entre 118 e 61 linhas;
4- Nossa รบltima coluna virtual completa na ordem correta esses valores.
APP URL Preรงo por extenso - AppSheet
olรก amigo, agradeรงo por ter compartilhado seu aplicativo, esta sendo muito รบtil, reparei que รก um pequeno erro de concatenar entre os nรบmeros de um milhรฃo e 9 milhรตes, onde ele esta interpretando como dezena de milhรตes e retornando errado, por exemplo 1100100,10 = e Milhรตes e 100 mil reais e dez centavos" chegou a verificar esse erro? poderia me auxiliar em como resolve-lo? obrigado
Obrigado pelo feedback, realmente hรก alguns casos onde isso acontece e nรฃo havia previsto. Verifiquei muitas variaรงรตes mas essa escapou, vou tentar revisar em breve assim que tiver um tempo mas vou deixar aqui caso queira olhar e tambรฉm de anotaรงรฃo:
O erro estรก na coluna Milhao entre as linhas 75 e 7103;
O correto รฉ que a fรณrmula verifique da direita para a esquerda o tamanho do nรบmero e coloque โโmilhรฃoโโ ou โโmilhรตesโโ de acordo com o tamanho:
xxx.yyy.zzz,aa
x= milhรฃo
y= milhar
z= centenas
a= centavos
Aparentemente o uso da vรญrgula interfere no resultado mas nรฃo consegui identificar como
SOLVED!
Congrats, can you explain how? Thanks @mattlops
Hi Sara!
Actually the problem is exactly was I told in the another comment. I figured out I miss a number on the formula passing the correct number by 1. After find the incorrect number I just change and the formula just worked fine.
The correct formulas is in the app
APP URL Preรงo por extenso - AppSheet
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |