1

Trying to remove all commas from a single line of text SharePoint Online field entries.

Any ideas on how to achieve that, any formatting formulas, or JSON?

Thank you in advance!

4
  • Where are you trying this? What have you tried so far? What worked, what did not work? Please be a bit more specific.
    – Nils
    May 28 '19 at 12:20
  • Hi Nils, tried this formula that is meant to be for a single line of text, but didn't work, the commas are still present - =ISNUMBER([ColumnName]+0) . Trying to find any JSON options, but nothing so far. I guess I can do it with jQuery, but then I need to return to classic mode and I want it to work in modern. May 28 '19 at 13:11
  • Wouldn't an SPFx extension esp. a Field Customizer be what you'd want?
    – Nils
    May 28 '19 at 13:40
  • Don't know what that is? May 29 '19 at 11:37
1

You would need to create an SPFx FieldCustomizer

Essentially you then would write

@override
public onRenderCell(event: IFieldCustomizerCellEventParameters): void {
  event.domElement.innerHTML = `<div>${event.fieldValue.replace(/[,\.]/g, "")}</div>`;
}

or whatever modifications you'd want to make.

0

Json column formmatting not provide operators to remove/replace special character currently: enter image description here

A workaround is to update the single line text field with CSOM Console Application directly to remove commas, please see the same question in the Technet I have replied yesterday:

Remove all commas from single line of text field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.