Is there a limit on the number of functions i...

Is there a limit on the number of functions in an app or in an expression? I have fighting with a persistent error that is blank and the only reason I can image I am getting this error is because my expression is very very long.

0 4 377
4 REPLIES 4

There are some limits that usually reflect as parsing errors (so you should see the error when you save the app definition).

Usually, if you have a very long function, it becomes difficult for a human to read/understand/debug. Could you share the problematic formula here? Maybe we can help you simplify it

I already removed some of the IF functions by putting some of the lines in vertebral columns. I am using all the โ€œifโ€ and โ€œlenโ€ functions to try to format a text show column to be a summary of an order.

=Concatenate(

โ€œRetailโ€, " (",

IF(CONTAINS([Estimated Product Cost] , โ€œ.โ€), [Estimated Product Cost] , Concatenate([Estimated Product Cost] , โ€œ.00โ€)) , โ€œ)โ€ , "

",

IF(CONTAINS([Retail Price], โ€œ.โ€),[Retail Price], Concatenate([Retail Price], โ€œ.00โ€)

), " ", "

โ€œ,[Retail Line Show],โ€

โ€œ,[Discount line show],โ€

", "

Discount", " (", if(Left(text([Discount]([Estimated Product Cost]/[Retail Price])),4)="", โ€œ0.00โ€,Left(text([Discount]([Estimated Product Cost]/[Retail Price])),4)), โ€œ)โ€, "

", " -

โ€œ, IF(CONTAINS([Discount], โ€œ.โ€),[Discount], Concatenate([Discount], โ€œ.00โ€)),โ€ ",

LEN(concatenate(โ€œDiscountโ€, " (" , if([Discount]="", โ€œ0.00โ€,Left(text([Discount]*([Estimated Product Cost]/[Retail Price])),4)), โ€œ)โ€ , IF(CONTAINS([Discount], โ€œ.โ€),[Discount], Concatenate([Discount], โ€œ.00โ€))

)),

,"

", "

Referral Cr.", " (", if([Substantiated Referral Cost]=0, โ€œ0.00โ€, text([Substantiated Referral Cost])),

โ€œ)โ€, "

", " -

โ€œ, IF(CONTAINS([Referral Credits Used], โ€œ.โ€),[Referral Credits Used], Concatenate([Referral Credits Used], โ€œ.00โ€)),โ€ ",

Len(Concatenate(โ€œReferral Cr.โ€, " (", if([Substantiated Referral Cost]=0, โ€œ0.00โ€, text([Substantiated Referral Cost])),

โ€œ)โ€,

IF(CONTAINS([Referral Credits Used], โ€œ.โ€),[Referral Credits Used], Concatenate([Referral Credits Used], โ€œ.00โ€)))), ,"

", "

Rewards Cr.", " (", if([Substantiated Rewards Cost]=0, โ€œ0.00โ€, text([Substantiated Rewards Cost])), โ€œ)โ€, "

", " -

โ€œ, IF(CONTAINS([Rewards Credits Used], โ€œ.โ€),[Rewards Credits Used], Concatenate([Rewards Credits Used], โ€œ.00โ€)),โ€ ",

Len(Concatenate( โ€œRewards Cr.โ€, " (", if([Substantiated Rewards Cost]=0, โ€œ0.00โ€, text([Substantiated Rewards Cost]))")", IF(CONTAINS([Rewards Credits Used], โ€œ.โ€),[Rewards Credits Used], Concatenate([Rewards Credits Used], โ€œ.00โ€)))), ,"

โ€œ, โ€œSubtotalโ€, " (โ€,

[Estimated Product Cost], โ€œ)โ€, "

โ€œ, IF(CONTAINS([Product Subtotal], โ€œ.โ€),[Product Subtotal], Concatenate([Product Subtotal], โ€œ.00โ€)),โ€ ",

Len(Concatenate(โ€œSubtotalโ€, " (", [Estimated Product Cost], โ€œ)โ€, "

", IF(CONTAINS([Product Subtotal], โ€œ.โ€),[Product Subtotal], Concatenate([Product Subtotal], โ€œ.00โ€)))), " โ€œ, Len(Concatenate(โ€œSubtotalโ€, " (โ€, [Estimated Product Cost], โ€œ)โ€,

IF(CONTAINS([Product Subtotal], โ€œ.โ€),[Product Subtotal], Concatenate([Product Subtotal], โ€œ.00โ€)))),

," ", "

S&H", " (", [Shipping Expense], โ€œ)โ€, "

", " +

", IF(CONTAINS([Shipping & Handling Charged], โ€œ.โ€),[Shipping & Handling Charged], Concatenate([Shipping & Handling Charged], โ€œ.00โ€)), " ",

Len(Concatenate("

S&H", " (",[Shipping Expense], โ€œ)โ€, "

", " +

", IF(CONTAINS([Shipping & Handling Charged], โ€œ.โ€),[Shipping & Handling Charged], Concatenate([Shipping & Handling Charged], โ€œ.00โ€)))), " โ€œ, Len(Concatenate(โ€œS&Hโ€, " (โ€,[Shipping Expense], โ€œ)โ€, IF(CONTAINS([Shipping & Handling Charged], โ€œ.โ€),[Shipping & Handling Charged], Concatenate([Shipping & Handling Charged], โ€œ.00โ€)))),

," ", "

Taxes", " (", [Taxes], โ€œ)โ€, "

", " +

", IF(CONTAINS([Taxes], โ€œ.โ€),[Taxes], Concatenate([Taxes], โ€œ.00โ€)), " ",

Len(Concatenate("

Taxes", " (", [Taxes], โ€œ)โ€, "

", " +

", IF(CONTAINS([Taxes], โ€œ.โ€),[Taxes], Concatenate([Taxes], โ€œ.00โ€)))), " โ€œ, Len(Concatenate(โ€œTaxesโ€, " (โ€, [Taxes], โ€œ)โ€, IF(CONTAINS([Taxes], โ€œ.โ€),[Taxes], Concatenate([Taxes], โ€œ.00โ€)))),

," โ€œ, โ€œCustomer Totalโ€, " (โ€,

([Estimated Product Cost]+[Shipping Expense]+, [Taxes],[Merchant Processing Cost]),")",

"

" ,

IF(CONTAINS([Customer Total], โ€œ.โ€),[Customer Total], Concatenate([Customer Total], โ€œ.00โ€)), " ",

Len(Concatenate(โ€œCustomer Totalโ€, " (",

([Estimated Product Cost]+[Shipping Expense]+, [Taxes],[Merchant Processing Cost]),")", "

" ,

IF(CONTAINS([Customer Total], โ€œ.โ€),[Customer Total], Concatenate([Customer Total], โ€œ.00โ€)))), " โ€œ, Len(Concatenate(โ€œCustomer Totalโ€, " (โ€,

([Estimated Product Cost]+[Shipping Expense]+, [Taxes],[Merchant Processing Cost]),")", IF(CONTAINS([Customer Total], โ€œ.โ€),[Customer Total], Concatenate([Customer Total], โ€œ.00โ€)))),

," โ€œ,โ€

โ€œ,โ€

โ€œ,โ€

Rewards/Referral Summary","

โ€œ,โ€

",โ€œRewards Credits Earnedโ€, "

โ€œ,[Rewards Credits Earned],โ€

","Referral Credits Earned By โ€œ,โ€ ",[Referral Credits Earned By Referrer] )

Harry2
New Member

@Daniel_Armstrong Hi Daniel, I highly recommend breaking down your expression into multiple intermediate results, each of which can be computed and stored using a virtual column. In the โ€œmasterโ€ expression, the intermediate results can then be used by referencing the virtual columns. If you give the virtual columns meaningful names, such as โ€œEstimated Costโ€, the โ€œmasterโ€ expression will become much easier to read and test.

@Harry Thatโ€™s what I ended up doing, I just wasnโ€™t sure if there was a limit. Thank you for the recommendation.

Top Labels in this Space