Error when trying to reference a specific value using row merge syntax

This is driving me crazy!

All I’m trying to create a condition on a model where the condition checks whether the selected field is less than another field on the same row. I’m using Row Merge Syntax

Here’s a screenshot of the condition

Here’s the error i receive when I try to preview the page
SELECT BOM_Qty_Req__c,BOMLineItem__r.BOM_Part__r.In_Stock__c,SalesOrderLineItem__r.Sales_Order__c,SalesOrderLineItem__r.Sales_Order__r.Name,SalesOrderLineItem__r.Sales_Order__r.Customer_PO_No__c,BOMLineItem__r.BOM_Part__c,BOMLineItem__r.BOM_Part__r.Name,BOMLineItem__c,BOMLineItem__r.Name,Id FROM Sales_Order_Line_Item_BOM__c WHERE (SalesOrderLineItem__r.In_Stock__c < )AND(BOMLineItem__r.BOM_Part__r.Part_Type__c in (‘Aluminum Raw Material’,‘Metalphoto Raw Material’,‘Stainless Steel Raw Material’)) ORDER BY Id LIMIT 501

Error:unexpected token: ‘{’

Why can’t I use row merge syntax on this condition?

I would really appreciate the help!

P.S. I received 3 errors trying to post this question… first a 422 error, then it refused to let me create a hyperlink to Skuid documentation saying links to that domain are not allowed?!? and finally, I guess I can only post 1 image since I have a new account…

Thanks for the additional notes about the new forum software. We’ll look into that.

As to your original question. We have never allowed merge syntax to be included in the “value node” of conditions. We could be clearer about that in the builder interface, but it has never worked. Skuid is simply throwing out the merge syntax content and the error is because your SOQL dosn’t have any thing to to compare after the “<”… Boo.

I think the way to get this working is to do the field comparison in a formula - and then write your condition on that formula field. Formula might be “{{FieldA}} - {{FieldB}}” and Condition might be “Formula > 0”. You can build that formula on the server or as a UI only field in the model (and run the condition client side).

Hope that helps.

1 Like

Thank you Rob! That works for me

1 Like

P.S. I received 3 errors trying to post this question… first a 422 error, then it refused to let me create a hyperlink to Skuid documentation saying links to that domain are not allowed?!? and finally, I guess I can only post 1 image since I have a new account…

Thanks for bringing this up! I will look into this to make it a little more lax for new users. I will look into it today and make the needed adjustments. :slightly_smiling_face: