Integrating a control-filter on a project manager with a "new project" button

This is a tiny little grace-note kinda thing, since what I have is completely functional, just not what I want!

I have a project management doc that allows you to manage multiple projects, but I want the user interface to be such that you only see a single project at a time. Easy, select-box and filter(). But I also want there to be a “new project” button. Easy, button and add row() to the project table.

Now the bit I can’t figure out. IF the user clicks “new project,” then the one project they should see should be the new project, right? But for the life of me, I can’t make it happen. I have put my select-box in a table so I can write to it, but I can’t get the button action to both create a new project AND write into the select box (and thus the filter). I am pretty sure the issue is that there are (perfectly natural) delays between the time the button actions complete (from the button’s point of view, as it were) and the time it takes to actually create the new row.

Any suggestions?

I have been trying something like this. But there is no pause with the pop-up table - it appears and immediately disappears.

Dear @Andrew_Milne,

I recommend to share a dummy doc of your project, where you try to explain at your best the end result you should like to receive!

This will make it much more easy to receive support, as the community members will a better idea of the set-up and a foundation to start from, without guesing what you intent to do :thinking:

1 Like

@Jean_Pierre_Traets, happy to oblige!

Hey Andrew!

Given that you have the Flows table like in my video, and you have a column, say, Current project that controls the filter, you can actually write a result of AddRow() into that cell:

[Current user].ModifyRows(
  [HLP Flows].[Current project], Projects.AddRow(
    ...
  )
)

AddRow() is perhaps the only function that actually returns a freshly created row, which you can then insert into a cell elsewhere.

If you need to Activate() that added project, you do it in the last step, referring to [Current user].[Current project]. Obviously you wrap it in RunActions() since there’s now two actions.


Your problem with the answer 2 is that you’re wasting the result of AddRow() by feeding it to Activate() before storing it elsewhere.

1 Like

@Paul_Danyliuk you are the best! Thanks!