Is there a ui-only field Limit?

  • 1
  • Question
  • Updated 1 year ago
  • Answered
I have around 30-35 UI-only fields on a model which I am using for validation purposes. It seemed to be working fine until last weekend but this morning I've been experiencing performance issues. The page doesn't load at all and the browser console doesn't give any errors either. On chrome the page tries to load and eventually crashes. The page loads if I go in and delete all the ui-only fields on the model. Any help/suggestions?
Photo of Ashwat

Ashwat

  • 768 Points 500 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I have had pages not load before it I screwed up the syntax of a UI only field. For example, if you do a merge and type:
{Name}}
The missing bracket might cause the page to not load.
Clone the page and remove the UI only formulas one by one and see if it is a specific formula causing the issue.
Photo of Ashwat

Ashwat

  • 768 Points 500 badge 2x thumb
Thanks a lot Raymond for that suggestion.. It worked and I was able to single out the field that was failing.

However, the field that was failing - the formula for that doesn't seem to be wrong.

This is the formula that is failing -

IF({{ui_isProductFIDRequest}} || {{ui_isNewCustomerRequest}},IF(ISBLANK({{Account__r.Business_Location__c}}),true,false),false)

where

{{ui_isNewCustomerRequest)) = IF ({{Record_Type_disp__c}} == 'New Customer Request',true,false)

{{ui_isProductFIDRequest}} = IF ({{Record_Type_disp__c}} == 'Product or Fulfillment ID Request',true,false)

I checked the Account__r.Business_Location__c value and it was null, but shouldn't ISBLANK take care of that? Should I be using some other function instead of ISBLANK?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I would use the same process. Erase pieces of your formula until you find the piece that is breaking.
Photo of Ashwat

Ashwat

  • 768 Points 500 badge 2x thumb
No it works fine now.. I removed that particular formula field - IF({{ui_isProductFIDRequest}} || {{ui_isNewCustomerRequest}},IF(ISBLANK({{Account__r.Business_Location__c}}),true,false),false)

My question now is how do I repair it? 

The Business_Location__c field if its not null, it returns false else true and I need for it to work like that hence the above formula.. but when it sees a null Business_location__c field, the page freezes.

When I remove that formula the page works fine.. but I cannot remove that formula... I need for it to be there. Thoughts?
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
I'm not sure why this formula would be giving you problems, but here are some ideas of ways to improve it:

1. Try wrapping the condition for your IF logic in parentheses
2. You don't need to do an IF around your ISBLANK, that returns a boolean already.

Try this:

IF(
({{ui_isProductFIDRequest}} || {{ui_isProductFIDRequest}}),
ISBLANK({{Account__r.Business_Location__c}}),
false
)
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
This isn't the answer you are looking for but it will take someone from Skuid probably answer why this isn't working. A work around, however, would be to create a Boolean salesforce formula field that returns false if the field is null and true if it is not. Then you can revise your UI only formula field to look to see if that field is true or false.  
Photo of Josh Merritt

Josh Merritt

  • 918 Points 500 badge 2x thumb
Ashwat,

I think Raymond was suggesting that you can debug your formula by breaking it down into smaller pieces and seeing that you get the expected result. 

e.g. make shorter formulas and verify they behave properly:
IF(ISBLANK({{Account__r.Business_Location__c}}),true,false)
or
{{ui_isProductFIDRequest}} || {{ui_isNewCustomerRequest}}
Hope this helps!
(Edited)
Photo of Ashwat

Ashwat

  • 768 Points 500 badge 2x thumb
Raymond/Zach/Josh - Thanks for all your suggestions and I apologize for wasting everybody's time. Turns out it was extreme stupidity on my part that was causing this issue. 

I had named this UI-only field as ui_BusinessLocation.. turns out I had created another UI-only field with the same name but with a different formula for a different validation and since I had created all these formulas directly within the xml instead of the skuid page builder, an error was never prompted on the screen.

It finally occurred to me to remove that field through the page builder and try creating it again and that's when I saw the error that another field with the same name already exists. And now I tried the same formula with a different field name and it worked fine.