In this paper, we introduce the relative $\mathcal{L}$-invariant $r\mathcal{L}(X)$ of a smooth, orientable, compact 4-manifold $X$ with boundary. This invariant is defined by measuring the lengths of certain paths in the cut complex of a trisection surface for $X$. This is motivated by the definition of the $\mathcal{L}$-invariant for smooth, orientable, closed 4-manifolds by Kirby and Thompson. We show that if $X$ is a rational homology ball, then $r\mathcal{L}(X)=0$ if and only if $X\cong B^4$. In order to better understand relative trisections, we also produce an algorithm to glue two relatively trisected 4-manifold by any Murasugi sum or plumbing in the boundary, and also prove that any two relative trisections of a given 4-manifold $X$...