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.
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] )
@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.
User | Count |
---|---|
32 | |
31 | |
30 | |
18 | |
17 |