Skip to main content
Nintex Community Menu Bar
Question

How to create branch based on number of rows in model

  • July 11, 2024
  • 5 replies
  • 37 views
  • Translate All

Forum|alt.badge.img+8

I’m trying to create a branch that checks to see if there’s any data in a model. I can’t seem to get this to work. Here’s what I have so far.

5 replies

Forum|alt.badge.img+13
  • Scholar
  • July 11, 2024

Hey Brayden, not sure what version of Skuid you are on currently, but there was a change a little while back.

As per documentation

Warning

In previous versions of Skuid, this value was a string. If your formulas or snippets use this merge variable ensure it is interpreted as an integer.

For example:

{{$Model.NewModel.data.length}} = “1”

Hope it helps!

Translate

Forum|alt.badge.img+8

Thanks Dave, I’ve tried it with and without the quotations and doesn’t seem to work either way. In addition, I’ve also tried defining the model context and without and doesn’t work either way.

Maybe this is a formula that isn’t valid as a branch criteria?

-Brayden

Translate

Forum|alt.badge.img+13
  • Scholar
  • July 11, 2024

Just a thought,

Did you try same formula in a UI field? Just to see if syntax is correct?

And if it works in formula UI-field, maybe you can reference that field in the Branch Criteria?

as well in example above they use 1 ‘=’, not sure if that makes a difference

Translate

Forum|alt.badge.img+8

Good idea. I will give that a try.

Translate

Forum|alt.badge.img+20

I would also try it without “== 0” as anything other than 0 should result in true.

Translate