AnsweredAssumed Answered

Trying to have active/focused Portal row set a global field - without added buttons

Question asked by stevegleason on Jan 10, 2014
Latest reply on Dec 12, 2017 by mirtev

I apologize for the semi-newbie question.

 

I'm using Filemaker 13 Advanced.

 

I have a solution that works, but it seems rather inelegant.

 

For a time tracking solution, I have a table for all employees. On each employee's record, there is a portal listing related work days (shifts). If I select an individual shift, an additional portal will list the shift detail, all of the assignments that the employee billed time to for that day.

 

(So effectively, I have the same thing as a Clients > Invoices > Invoice Line Item Detail relationship).

 

In order to have the shift detail portal display related records, I have the date field in the shifts portal set as a button to activate a script that sets a global variable with the selected shift. That works fine. I have some conditional formatting that helps keep the focus on that selected shift portal row, too. But this feels kludgy. I am going to need to repeat this type of filtering throughout my solution. And I would like to do it with the leanest design that I can.

 

What I would prefer is if the "active row state" on the shifts portal would set the global variable. I have tried setting the whole portal row as a button, but doesn't let me select an individual portal row, it just takes the value from whichever value is in the first row of the portal.

 

I would think that defining related portals by a "key" field in an active/focused portal row would be a fairly common ask. (My next beef is the need to use hacks in order to have dynamically sorted portal row headers - again, I feel that this would be a common usage for portals as "lists within layouts" - where you could designate header rows as sort keys. And in an idealized version, you could select multiple sort keys, designating the order and direction (ascending/descending).


I would appreciate any suggestions.

 

Thanks

Outcomes