In the transaction saved searches, the “Location” field displays the header level location value.
There is no standard field available for the line-level location field. So to get the header level and line location, follow the below formula.
For the Main Location value,
Formula(Text) -> Summary function Maximum -> formula = case when {mainline} = ‘*’ then {location} else Null end
For item line location value,
Formula(Text) -> Summary function Maximum -> formula = case when {mainline} = ‘*’ then Null else {location} end