@jortheldens I think what you want to do is just put onto the page a group that contains the ‘plannings’ data type entry and use that ‘is empty’ or ‘is not empty’ to determine if you are creating or editing something that already exists.
In your current setup there is not really an image that shows what the search is, so my assumption is that it is a search based on a unique id of an entry that is already on the page or not, and so you should just use that detail in your dynamic expressions of the workflows.
So, you have group “planning” of data type “planning” that when creating a new “planning” is empty, which signals, “planning” is being created, and when you are editing, it is because planning already exists and from some existing list you pressed an icon or button to say ‘edit this existing planning’ and used a display data action to send that selected existing data entry to the group as its data source so you can show the existing details, which means, the group “planning” entry ‘is not empty’.
No need to run searches in dynamic expressions of the workflow actions.
@senecadatabase suggested possibly having separated workflow series, which is helpful, and in this situation would just mean, you have your one button, with two workflow triggers, one that says ‘when planning planning is empty’ and a second that says ‘when planning planning is not empty’…in the first series are your actions for creating the entries, and in the second, it is for editing the entries.
However, if you expect, as I do, that a user is going to likely come into an existing planning, and want to change only one entry (let’s say entry 5) and leave all 9 others the same, you do not want to run make changes on all 10 (waste of resources), and instead just want to run an action to make changes to just the one…that would mean, to optimize this, you may want to add a button into each of your 10 groups that is only visible when ‘planning planning is not empty’ so that you can target the make changes to just the one group…and you can still keep your existing one button that would read ‘make changes to all’ so that a user could make changes to all 10 at once if they choose to, without a need to press a button for each (ie: press 10 buttons).
There are UX considerations when it comes to optimizing an app and those impact the workflow setup…you do not need to change things if you do not want to in regards to the extra buttons in each group for the individual changes, bubble will only charge for the action (0.6 wus) when it doesn’t actually make any changes (bubble automatically detects no changes required and doesn’t perform), so in theory, if a user were to change only 1 of the 10 and you use just a single button to run the make changes to all 10 in a single series, you will only be wasting (5.4 WUs) per press of button.