Creating a 'plan' of items

Hi all

I’m working on implementing a plan creation feature in my app where a user can select pre-defined items from a list and see them in their newly created plan. Here’s a detailed walkthrough of what I’m trying to achieve and what I’ve set up so far:

Target flow…

  • A user is on the ‘Plans’ section and clicks ‘Create plan’
  • They enter a plan name and select items from a pre-defined list of ‘Items’, which includes image thumbnails for each item (so can’t use a checklist)
  • Upon clicking ‘create’, the ‘Plans’ table is updated with a new row that stores these Items for that plan
  • The user then returns to the ‘Plans’ section to see the newly created plan listed
  • When they click on the plan name, it displays the list of items they selected

What I’ve done so far…

  • Set up these tables: ‘Items’, ‘Plans’, ‘Plans-Working’
  • Set up relations: Linked via user ID (templated versions of the Row ID in the users column)
  • Actions:
    • In the ‘Plans’ section, the title bar action ‘Create plan’ sets column values in ‘Plans-Working’ (clearing values to prepare for new entries) and shows a new screen based on this table
    • In the new screen, an inline list of ‘Items’ from the ‘Items’ table allows item selection, with a custom action where if the Item is clicked it sets a boolean column ‘Selected’ in the ‘Items’ table to true for that Item
  • Columns:
    • A ‘selectedItemId’ column in ‘Items’ uses an if/then/else condition to hold the item ID when ‘Selected’ is true
    • A Joined List in ‘Items’ combines these selectedItemIds
  • And then I got stuck…

I feel like I’m over-complicating the setup haha. I realised I didn’t know how to convert a Joined List into an inline list of Items later for the user to view as part of a Plan.

Is there a more straightforward way to create ‘plans’ from a pre-defined list of items, and to be able to view these plans afterwards?

So a Plan can hold multiple items, right? Is there a reason why you don’t use a choice component to hold mutliple item IDs?

1 Like

Oh yes, that could work! The only issue is I’m not sure how I’d then display this list of items when the user chooses to review the plan? i.e. is there a way to show a joined list or equivalent as a list of items, as I’ve noticed that inline lists don’t work on a single row?

Looks like you added a Split Text column to create an array. Using that array, you can create a relation to the relevant table. Then use the relation as the source of a collection.

1 Like

Great stuff, that works perfectly.

Thanks both! Very grateful.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.