Action not triggering for condition

I have a detail screen where users can select an item from the inline view and the system should either open a LINKTO FORM screen or a LINKTOFILTEREDVIEW screen based on a condition.

The inline view has a grouped event action in place when the row is selected and within the grouped action is of course the 2 conditional actions:

When I test the conditions, I can see the data in “receipts_for_pastday” meets the condition for Conditional Action 2 (open_receipt_fr_route) but the system continues to trigger action 1.

Is there something I’m missing in the condition?


Conditional action 1:


Conditional action 2 - open_receipt_fr_route:


receipts_for_pastday data:

It sounds that the actions are on the “Routes” table and LOOKUP() is getting data from the “receipts_for_pastday” table.

So does adding [_THISROW].[Truck Number] instead of only [Truck Number] in teh first argument of LOOKUP() in both the actions help?

2 Likes

Also, you should be able to do this with just one Action.

IF(
  x ,
  LINKTOFILTEREDVIEW() ,
  LINKTOFORM()
)
3 Likes

Thanks Suvrutt, will give it a try. :slight_smile:

Nice! Didn’t know this would work - I’ll give it a try as well. Thanks Marc!

It worked! Also added [_THISROW] to the target as well.

LINKTOFILTEREDVIEW(“Receiving Detail”, [_THISROW].[Truck Number] = [Truck Number])

Here’s the issue though: The filter should apply to a particular slice and not the entire table the view is based on. Is there a way to apply a slice to the [Truck Number] on the end. Something like:

Yes, you can use slice-name[column], just the same as table[column]. You just need to use IN() in this case here.

1 Like

Thanks @Marc_Dillon Marc and @Suvrutt_Gurjar. Since LINKTOFILTEREDVIEW is used for table views I had to switch to LINKTOROW in order to display a Detail View.

Here are final “working” expressions for community reference:

Target:
LINKTOROW(
LOOKUP([_THISROW].[Truck Number],“receipts_for_pastday”,“Truck Number”,“receiving_id”),
“Receiving Detail”)

Condition:
LOOKUP([_THISROW].[Truck Number],“receipts_for_pastday”,“Truck Number”,“Status”)=“IN_PROGRESS”

Thanks again!!

4 Likes