Skip to main content
Nintex Community Menu Bar
Question

Tricky model condition.

  • July 9, 2024
  • 4 replies
  • 0 views
  • Translate

Forum|alt.badge.img+4

Here is a scenario which i have not been able to put a logic for.
display set of records from object A where logged in user is owner and record is created in last 90 days
OR
display set of records from object A where record created in last 90 days and logged in user is member of its child object record B

now there is a possibility that logged in user is owner as well as member in object B. somehow, all the permutations and combinations fails to fetch correct data. either no row is returned or if i disable one of the condition, then incomplete dataset is returned. any suggestions will be appreciated.

Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+4

What do you mean by ‘member of child object record’?

Translate

Forum|alt.badge.img+4

means B.user__c = running user

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

This is doable in Skuid.

First you need to set up a condition that limits records to those created in the last 90 days. It looks like that is required on both paths.

Second, set up a condition that limits records to those owned by the current user.

The third part is tricky. You can’t just do a subquery condition and then include it in an or statement (with 2) Salesforce will yell at you. So you need to create a second model (put it above your first model). It needs to filter all the children records to those owned by the current user. (You might also be able to reduce that model volume by adding a second condition that limits it to records whose parent was created in the last 90 days). This model also needs to have the parentId as a field.

Then go back to your first model and add a third condition that filters record ID’s to those IN the list of Parent ID’s from the second model. See this condition below - where I’m trying to filter Accounts to those where the Opportunity Child record is owned by the running user.

Finally you tie these together with Grouping Logic so that records are retrieve when they meet conditions 1 and (2 or 3).

That should take care of things.

Translate

Forum|alt.badge.img+4

thanks Rob. the sequence of models was the issue. thanks again.
🙂

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings