Skip to main content
Nintex Community Menu Bar
Question

Subquery conditions not working

  • Jul 9, 2024 7:43 PM UTC
  • 16 replies
  • 68 views
  • Translate All

Forum|alt.badge.img+18

Here is the condition definition:

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

SELECT 
HasCompleteAppointment\_\_c,
HasScheduledAppointments\_\_c,
Patient\_\_c,
Patient\_\_r.Name,
(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),
Id 
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?

16 replies

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

^^bump^^

Really need this to work soon.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

^^bump^^

Can someone look at this today?

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

^^

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

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

Translate

Forum|alt.badge.img+8

Hey Matt,

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

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 9:19 PM UTC

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 Support@skuidify.com

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

Field level security looks fine.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

Will send right now. Thanks!

Translate

Forum|alt.badge.img+8

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?

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

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!

Translate

Forum|alt.badge.img+8

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?

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

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?

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

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…

Translate

Forum|alt.badge.img+8

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.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

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

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 9:19 PM UTC

It works! Thanks for the help, Ben!

Translate