Skip to main content

Formating formula syntax

  • Jan 11, 2023 3:31 PM UTC
  • 3 replies
  • 532 views

Guillermo Puls
Wallflower
Forum|alt.badge.img+1

Hi Pigment team:

I’m trying to format the formulas so I can make them easier to read.

For instance, I have a formula that is an addition of 4 items and goes on for 5 lines (difficult to read), I’m looking to structure the formula in 4 lines (easier to digest):

= Item 1 +

Item 2 +

Item 3 +

Item 4

 

Is this something we can do?

 

Thanks in advance :D

3 replies

Stef
Employee
Forum|alt.badge.img+14
  • Employee
  • Jan 11, 2023 3:40 PM UTC

Hi @Guillermo Puls ,

You can use SHIFT + ENTER to add new (blank) lines in your formula. 

Something like this: 

 

You can also add comments with “//” (for single line) and “/*” and “*/” for multiple lines. Hope this helps. 


francois
Employee
Forum|alt.badge.img+13
  • Employee
  • Jan 11, 2023 3:47 PM UTC

Hi,

For more advice on formula formatting, here’s an article I’ve written that has some advice on what you can do.

In that case, I’d recommend having the + at the start of the line, as I find it easier to see at a glance.


Guillermo Puls
Wallflower
Forum|alt.badge.img+1

Thanks Stef and François,

I tried command /Control + Enter and wasn’t working, now that article sits in my favourites.

Thanks again!