Display Action Button on Child Table

I have an MDR table which has mdrID, and a child table MDR_Personnel where its mdrID is referenced to MDR table.

This is a form entry and approval application wherein I want the following behaviors:

  1. MDR Personnel Add action button should show on MDR_Form entry.
  2. MDR Personnel Add action button should show on MDR_Personnel_Inline.
  3. MDR Personnel Add action button should only be available to Commander Users[role]
  4. MDR Personnel Add action button should only show when [mdrID].[status]=“Draft”

This is my current code for MDR_Personnel Add action

AND(
LOOKUP(
USEREMAIL(),
“Users”,
“userEmail”,
“role”
) = “Commander”,

OR(
CONTEXT(“View”) = “MDR_Personnel_Form”,

LOOKUP(
  [mdrID],
  "MDR",
  "mdrID",
  "status"
) = "Draft"

)
)

My problem here is that it’s not showing an add button on MDR_Personnel inline inside MDR Details even though my role is Commander and status is Draft

Hi @Schemiz

In the Action section of the behavior section, try filling it in with the formula

OR(CONTEXT(“VIEW”)=“MDR Form entry”, (CONTEXT(“VIEW”)=“MDR Personnel Inline”,[role]=“commander”,[madrID].[status]=“Draft”)

I hope the formula works