alexed1 / LightningFlowComponents

A collection of unofficial Flow extensions that can be used to enhance Salesforce Flow and Orchestrator.
http://unofficialsf.com
Other
594 stars 583 forks source link

CSV File Import - Two issues to report. #902

Open bottomlinebrokers opened 3 years ago

bottomlinebrokers commented 3 years ago

I am using CSV File import v1.3. I have two issues to report:

1 - I have comma characters in certain text fields that I am importing, therefore I need to change the delimiter. But the only valid delimiter other than a comma character (from trial and error and viewing the code) is a semicolon character. However, that means I cannot import and multi-select picklists, which naturally use semicolons to delimit multiple entries. Am I doing something wrong, or do we need greater flexibility in what characters can be used as a delimiter?

2 - The documentation on https://unofficialsf.com/from-suraj-pilai-and-hijlko-csv-file-import-gets-some-great-internationalization-improvements states that if you leave the separators (field, thousand, and decimal) and currency symbol blank, it will default to existing default values. However, (A) those fields are required in the Flow Action, and (B) when I leave one of those fields NULL, the code throws an error.

surajp commented 3 years ago

@bottomlinebrokers The action should be handling commas within columns as long as you enclose the column in double quotes. you need not change the delimiter. You can see this here in the tests. Are these tests not passing for you?

bottomlinebrokers commented 3 years ago

Suraj,

I tried that, but perhaps I didn't do it properly.

  1. Please confirm that the columns need to look like:
  2. ""Text, with comma"", ""next field"", ""field ; with ; semicolon"
  3. Is it all or nothing? In other words, do I only double quote the columns that need special handling, or do I have to double quote all columns within the CSV?

Once I get this response, I will try another test today and let you know.

Mark


From: Suraj Pillai @.> Sent: Saturday, September 25, 2021 8:54 AM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

@bottomlinebrokershttps://github.com/bottomlinebrokers The action should be handling commas within columns as long as you enclose the column in double quotes. you need not change the delimiter. You can see this herehttps://github.com/alexed1/LightningFlowComponents/blob/379a2f6efb4842e1b1c149548b3f08a3b464f360/flow_action_components/ConvertCSVToRecords/force-app/main/default/classes/ConvertCSVToRecordsTest.cls#L118 in the tests. Are these tests not passing for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-927140463, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TBCUSPJQ7O6MXIRYDLUDXWDRANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bottomlinebrokers commented 3 years ago

Ok, apologies for the earlier comment. I didn't read the test line carefully enough. :) I ran a single record CSV upload test, and yes, it failed for my case.

Attached is a CSV with a single record to import. The field in question that causes the crash is a Multi-Select Picklist named Real_Estate_Type__c, which has "Restrict picklist to the values defined in the value set" = TRUE for data consistency. The picklist values are:

Agent, Commercial Agent, Residential Appraiser Broker, Business Escrow Officer Landlord Property Manager

In my test record, I try to import that field as "Agent, Commercial; Agent, Residential; Appraiser; Broker, Business; Escrow Officer; Landlord; Property Manager", and it fails to import. Error message:

"Error Occurred: This error occurred when the flow tried to create records: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST: bad value for restricted picklist field: Broker~`~ Business. "

This happens on one of the comma separated items. I can remove one (say, Broker, Business) and it will error out on Agent, Residential.

Please advise. I am at a bit of a standstill until this is resolved.

Thank you kindly!

Mark

Accounts Data - Easy Test.csv

surajp commented 3 years ago

@bottomlinebrokers I just reviewed the code and looks like what I had originally submitted did not make it correctly into the final version published by USF. @alexed1 The issue reported here is due to the commas not being put back into place after fields have been parsed. Specifically these lines are missing. I can't imagine how the tests would have passed. Hijiko had also reported that his code was not merged correctly. I am currently looking into fixing this particular issue, but more investigation might be needed to ensure the code works correctly, overall.

surajp commented 3 years ago

I just ran the tests and those passed. I will investigate some more and report what I find. @bottomlinebrokers can you confirm you are running the latest version of the code?

surajp commented 3 years ago

@alexed1 Looks like I did not have enough asserts in the test to check the output after parsing. @bottomlinebrokers I have submitted a fix for this (and some other issues I discovered) along with more asserts in the test to catch these issues #921

bottomlinebrokers commented 3 years ago

I am running v1.3, so it is whatever the latest published version is.

Mark


From: Suraj Pillai @.> Sent: Sunday, September 26, 2021 8:36 AM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

I just ran the tests and those passed. I will investigate some more and report what I find. @bottomlinebrokershttps://github.com/bottomlinebrokers can you confirm you are running the latest version of the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-927325378, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TFXSVLJTIC535VBDBLUD44YNANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bottomlinebrokers commented 3 years ago

FYI, Suraj, we are a person Accounts org. I don't know if that makes a difference for you.

Mark


From: Suraj Pillai @.> Sent: Sunday, September 26, 2021 9:59 AM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

@alexed1https://github.com/alexed1 Looks like I did not have enough asserts in the test to check the output after parsing. @bottomlinebrokershttps://github.com/bottomlinebrokers I have submitted a fix for this (and some other issues I discovered) along with more asserts in the test to catch these issues #921https://github.com/alexed1/LightningFlowComponents/pull/921

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-927336951, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TASXWQ2ZPWKZ6ZKSYLUD5GPTANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

surajp commented 3 years ago

@bottomlinebrokers I have submitted a fix for the issue as noted in my previous comment..feel free to grab the files in my fix if you know how, to resolve the issue. Else, you would have to wait till @alexed1 merges my PR

bottomlinebrokers commented 3 years ago

Sorry, I don't know how. :) I will install the updated package once it's ready.

Suraj - Thank you kindly for your prompt assistance ... it moves my project forward!!

Alex - Any ETA? I can only imagine how busy you are, but I'm at a hard stop until the new version is published.

Thank you!

P.S, Alex -- UnofficialSF and your initial flow training videos have allowed me to do wonders for our org. My daughter (an 18-year old HS robotics team veteran) was able to pick up Flow Builder quickly and migrate 5 years of PBs to Flow during her gap year before she left for college! Now that we're 100% Flow, we rollout new features and tweaks very quickly. Deepest gratitude from a huge Flow fan!!!


From: Suraj Pillai @.> Sent: Sunday, September 26, 2021 1:32 PM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

@bottomlinebrokershttps://github.com/bottomlinebrokers I have submitted a fix for the issue as noted in my previous comment..feel free to grab the files in my fix if you know how, to resolve the issue. Else, you would have to wait till @alexed1https://github.com/alexed1 merges my PR

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-927365796, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TDC2FVFWVJZAVVAEG3UD57PJANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bottomlinebrokers commented 3 years ago

Gents,

Any ETA on publishing a new CSV download? Please advise.

Thank you kindly!

Mark


From: Mark Pieter @.> Sent: Sunday, September 26, 2021 2:11 PM To: alexed1/LightningFlowComponents @.>; alexed1/LightningFlowComponents @.> Cc: Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

Sorry, I don't know how. :) I will install the updated package once it's ready.

Suraj - Thank you kindly for your prompt assistance ... it moves my project forward!!

Alex - Any ETA? I can only imagine how busy you are, but I'm at a hard stop until the new version is published.

Thank you!

P.S, Alex -- UnofficialSF and your initial flow training videos have allowed me to do wonders for our org. My daughter (an 18-year old HS robotics team veteran) was able to pick up Flow Builder quickly and migrate 5 years of PBs to Flow during her gap year before she left for college! Now that we're 100% Flow, we rollout new features and tweaks very quickly. Deepest gratitude from a huge Flow fan!!!


From: Suraj Pillai @.> Sent: Sunday, September 26, 2021 1:32 PM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

@bottomlinebrokershttps://github.com/bottomlinebrokers I have submitted a fix for the issue as noted in my previous comment..feel free to grab the files in my fix if you know how, to resolve the issue. Else, you would have to wait till @alexed1https://github.com/alexed1 merges my PR

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-927365796, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TDC2FVFWVJZAVVAEG3UD57PJANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ericrsmith35 commented 3 years ago

The link (v1.3.2) is up on unofficialsf.com https://unofficialsf.com/narender-singh-brings-csv-imports-to-flow/

CodeKoz commented 3 years ago

@surajp Thanks for the changes for the bulletpoint 1 .

Is the behaviour mentionned in point 2 normal? I have some CSV without thousand separator, and I cannot leave the separator blank or with an empty/null value. Is there a way to validate without separator?

Hijlko commented 3 years ago

In the currency part there may be an issue: I found out hat when the CSV file contains a currency field AND the currency symbol, with or without a space ('$' or '$ ' or '€' or '€ ' etc.) the value can get imported as 0. This is the current code (without the comment lines) in apex in the "When currency" part" :

when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.')); } }

Change this to: when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.').replace(vCur + ' ','').replace(vCur,'')); } }

bottomlinebrokers commented 3 years ago

Gents,

Do we have an ETA to push live a version of CSV with the cumulative fixes rolled in? Waiting on this....

Thank you kindly!

Mark


From: Hijlko @.> Sent: Thursday, October 28, 2021 2:42 AM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

In the currency part there may be an issue: I found out hat when the CSV file contains a currency field AND the currency symbol, with or without a space ('$' or '$ ' or '€' or '€ ' etc.) the value can get imported as 0. This is the current code in apex in the "When currency" part" : when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { / both WITHOUT Thousands separator and WITHOUT decimal separator / / No conversion needed / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { /example: change value WITHOUT thousands separator and WITH decimals like 1.234 (US) or 1,234 (EU) to 1.234 (US)/ / Convert comma as decimal separator to point / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { /example: change value WITH thousands separator and WITHOUT decimals like 1,234 (US) or 1.234 (EU) to 1234 / / Remove comma and point as Thousands separator (no decimals present) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { /example: change value WITH thousand separator and WITH decimals like 1,234.56 to 1234.56 (US) / / Remove comma Thousands separator, leave decimal separator unchanged) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { /example: change value WITH thousand separator and WITH decimals like 1.234,56 to 1234,56 (EU)/ / Remove point as Thousands separator, change comma to point as decimal separator / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.')); } }

Change this to: when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { / both WITHOUT Thousands separator and WITHOUT decimal separator / / No conversion needed / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { /example: change value WITHOUT thousands separator and WITH decimals like 1.234 (US) or 1,234 (EU) to 1.234 (US)/ / Convert comma as decimal separator to point / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { /example: change value WITH thousands separator and WITHOUT decimals like 1,234 (US) or 1.234 (EU) to 1234 / / Remove comma and point as Thousands separator (no decimals present) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { /example: change value WITH thousand separator and WITH decimals like 1,234.56 to 1234.56 (US) / / Remove comma Thousands separator, leave decimal separator unchanged) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { /example: change value WITH thousand separator and WITH decimals like 1.234,56 to 1234,56 (EU)/ / Remove point as Thousands separator, change comma to point as decimal separator / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.').replace(vCur + ' ','').replace(vCur,'')**); } }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-953684114, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TF6NXIGVUHDM67QR6DUJESLFANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hijlko commented 3 years ago

Hi, Because I will retire, I will not be working on SF items anymore. Maybe someone else can apply the changes that I suggested in my email below. Kind regards, Hijlko Roosjen


From: Mark Pieter @.> Sent: Tuesday, November 2, 2021 12:15:46 AM To: alexed1/LightningFlowComponents @.> Cc: Hijlko @.>; Comment @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

Gents,

Do we have an ETA to push live a version of CSV with the cumulative fixes rolled in? Waiting on this....

Thank you kindly!

Mark


From: Hijlko @.> Sent: Thursday, October 28, 2021 2:42 AM To: alexed1/LightningFlowComponents @.> Cc: Mark Pieter @.>; Mention @.> Subject: Re: [alexed1/LightningFlowComponents] CSV File Import - Two issues to report. (#902)

In the currency part there may be an issue: I found out hat when the CSV file contains a currency field AND the currency symbol, with or without a space ('$' or '$ ' or '€' or '€ ' etc.) the value can get imported as 0. This is the current code in apex in the "When currency" part" : when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { / both WITHOUT Thousands separator and WITHOUT decimal separator / / No conversion needed / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { /example: change value WITHOUT thousands separator and WITH decimals like 1.234 (US) or 1,234 (EU) to 1.234 (US)/ / Convert comma as decimal separator to point / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { /example: change value WITH thousands separator and WITHOUT decimals like 1,234 (US) or 1.234 (EU) to 1234 / / Remove comma and point as Thousands separator (no decimals present) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { /example: change value WITH thousand separator and WITH decimals like 1,234.56 to 1234.56 (US) / / Remove comma Thousands separator, leave decimal separator unchanged) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { /example: change value WITH thousand separator and WITH decimals like 1.234,56 to 1234,56 (EU)/ / Remove point as Thousands separator, change comma to point as decimal separator / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.')); } }

Change this to: when CURRENCY { String fValue = fieldValue.replaceAll('^0-9,.','').replace(vCur + ' ','').replace(vCur,''); if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) < 0 ) { / both WITHOUT Thousands separator and WITHOUT decimal separator / / No conversion needed / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) < 0 && fValue.indexOf(Dsep) > -1) { /example: change value WITHOUT thousands separator and WITH decimals like 1.234 (US) or 1,234 (EU) to 1.234 (US)/ / Convert comma as decimal separator to point / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','.').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) < 0) { /example: change value WITH thousands separator and WITHOUT decimals like 1,234 (US) or 1.234 (EU) to 1234 / / Remove comma and point as Thousands separator (no decimals present) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace('.','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == ',') { /example: change value WITH thousand separator and WITH decimals like 1,234.56 to 1234.56 (US) / / Remove comma Thousands separator, leave decimal separator unchanged) / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue.replace(',','').replace(vCur + ' ','').replace(vCur,'')); } if( fValue.indexOf(Tsep) > -1 && fValue.indexOf(Dsep) > -1 && Tsep == '.') { /example: change value WITH thousand separator and WITH decimals like 1.234,56 to 1234,56 (EU)/ / Remove point as Thousands separator, change comma to point as decimal separator / convertedfieldValue = String.isEmpty(fieldValue) ? null : Decimal.valueOf(fValue = fValue.replace('.','').replace(',','.').replace(vCur + ' ','').replace(vCur,'')**); } }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/alexed1/LightningFlowComponents/issues/902#issuecomment-953684114, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNO7TF6NXIGVUHDM67QR6DUJESLFANCNFSM5DYPM5SA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falexed1%2FLightningFlowComponents%2Fissues%2F902%23issuecomment-956854478&data=04%7C01%7C%7Cc3ed63cf0ae14bf25ca308d99d8d88f5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637714053485142721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DPXBBF3ndoueOlnc5sI8h%2BvkabPEsVm7xBad5Ny%2F6cw%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATDLIK2BOQXQZNOYEPMR4QLUJ4NSFANCNFSM5DYPM5SA&data=04%7C01%7C%7Cc3ed63cf0ae14bf25ca308d99d8d88f5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637714053485152716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nBNRudKn%2F3c3d4kfvLBmqXFHJGAL2GZVqlFsynNWdCY%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cc3ed63cf0ae14bf25ca308d99d8d88f5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637714053485162710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=It46cA%2FXhIoGWtsCdBBXQGS2eaXe%2BFWYiICEN05CjTc%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cc3ed63cf0ae14bf25ca308d99d8d88f5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637714053485162710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9vLoSfQjmKCGKFqH48%2BSeAwW4JP0Vs4CX5b%2FU%2BWE%2BTc%3D&reserved=0.

CodeKoz commented 2 years ago

Hey everyone,

Is someone taking the relay on this wonderful component @alexed1 ?

alexed1 commented 2 years ago

No volunteers so far, @CodeKoz . Any interest?