# A format button for the data viewer

**URL:** <https://the.fmsoup.org/t/a-format-button-for-the-data-viewer/4958>\
**Category:** MBS Plugins\
**Tags:** mbs, data-viewer\
**Created:** [July 17, 2025, 7:40am UTC](https://the.fmsoup.org/t/a-format-button-for-the-data-viewer/4958 "2025-07-17T07:40:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [July 17, 2025, 7:40am UTC](https://the.fmsoup.org/t/a-format-button-for-the-data-viewer/4958/1 "2025-07-17T07:40:52Z")

</div>

In [MBS FileMaker Plugin](https://www.monkeybreadsoftware.com/filemaker/) 15.3 we have a Format button on macOS for the data viewer's detail view. If the data is XML or JSON, we can use the format and colorize functions: [JSON.Format](https://www.mbsplugins.eu/JSONFormat.shtml) & [JSON.Colorize](https://www.mbsplugins.eu/JSONColorize.shtml), [XML.Format](https://www.mbsplugins.eu/XMLFormat.shtml) & [XML.Colorize](https://www.mbsplugins.eu/XMLColorize.shtml).

Let's say you have some variables in the data viewer with XML or JSON content.

![](https://www.mbsplugins.de/image/DataViewerFormat1.png)

When you double click the text, you get a new window showing the detail. Here we find the Format button added by MBS Plugin. Press the button and it will format the content:

![](https://www.mbsplugins.de/image/DataViewerFormat2.png) ![](https://www.mbsplugins.de/image/DataViewerFormat3.png)

![](https://www.mbsplugins.de/image/DataViewerFormat4.png) ![](https://www.mbsplugins.de/image/DataViewerFormat5.png)

If we get a parse error or the content is not XML/JSON, we beep.

If you click OK, the formatted text is stored in the variable. If you press cancel, the unformatted text stays in the variable.

![](https://www.mbsplugins.de/image/DataViewerFormat6.png)

Please try the feature and let us know what you think. Available for macOS in [MBS FileMaker Plugin](https://www.monkeybreadsoftware.com/filemaker/) 15.3.

---

<div class="post-metadata">

**Author:** ![rivet](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/rivet/32/1727_2.png) [@rivet](https://the.fmsoup.org/u/rivet)\
**Post date:** [July 17, 2025, 9:13pm UTC](https://the.fmsoup.org/t/a-format-button-for-the-data-viewer/4958/2 "2025-07-17T21:13:51Z")

</div>

This is great! Could you please add it to the Insert Text script step as well? Thank you
