Subquery conditions not working

Here is the condition definition:

Here is the result of model.soql (which I believe reflects the query that is actually executing?):

(SELECT Signature\_Name\_\_c,Signature\_Date\_\_c,Signature\_Text\_\_c,SignatureData\_\_c,Id FROM Signatures\_\_r  WHERE ((Signature\_Type\_\_c = 'MD Medical Chart')) LIMIT 10),
FROM Patient\_Case\_\_c 
WHERE (HasCompleteAppointment\_\_c \> 0.0)
AND(HasScheduledAppointments\_\_c = 0.0)
AND(Id not in (
SELECT Patient\_Case\_\_c 
FROM Signature\_\_c 
**WHERE (((Signature\_Type\_\_c = 'MD Medical Chart')))**
) LIMIT 21

Notice that only the first subquery condition is executing. Any idea how to make all four conditions execute?


Really need this to work soon.


Can someone look at this today?


I haven’t given up on this. Really need a solution!!!

Hey Matt,

Do you know if you user has Field Level security on those fields. Specifically the ones missing from the SOQL query?

We’ve passed this issue around and don’t see anything obvious.  Would you mind granting us login rights and sending us the repro information?  (Org ID, Page Name, Model…)

You can send all that to

Field level security looks fine.

Will send right now. Thanks!

Hi Matt,

I think the reason that they’re being removed from your SOQL query is that neither Long Text or Encrypted fields are allowed in SOQL filters. Is there any way you could populate a different field when the signature is created?

Any thoughts on how to do that? Should I just do it in the custom component definition? Apparently you can’t use encrypted text fields in workflow rule criteria, either!

When you create the signature object, just set some other fields on that object as well that you could use in your query. Do you have control of the code that creates the Signature object?

Yes, I wrote the code for the custom component.

If I add a boolean field to the object called SignatureExists__c, does that field have to be in the skuid model for me to use

model.updateData(row, {SignatureExists__c: true});


Or can I use that even if I don’t have the field in the skuid model?

Also… is there a good way to update all the existing rows in my data? Currently the SignatureExists__c field will only be useful for newly created rows in the Signature object…

Yes, the field needs to be in your model for updateRow to work properly.

I wouldn’t say there’s a “good” way. If it’s less than a couple thousand rows, you could write Anonymous apex. If it’s more than that, you’ll probably need to write a batch apex script.

Less than a thousand rows, actually. I just did it manually with a skuid table. :slight_smile:

It works! Thanks for the help, Ben!