Hello there!
So i have 2 tables i made. 1 is like a list of items and the other is a monthly plan.
My wish is that with a push of a button (or 2) i can make a random monthly plan.
And those comes a Huge list of filters that I tried to apply and completely failed.
I think the best solution for it are 2 types of buttons.
- A general one that just adds the rows to the table with date.
- Inside the table button for every row with that outputs the item from the list after applying several filters.
So as for the general button just a filter that wont duplicate the dates that already exists in the table. I also tried to make it push all the buttons of the new rows that have been just created.
For the button in the table, that’s a bit more complicated.
- A filter that wont let it get an item from the list that already had been out in the last 14 days.
- In the second table “Games Manual” I tried to categorized most of my items with as many categories I can especially for this moment. So for example one filter would be “Adults” or “Ubicación” (location) and so on. My guess is that its “just” playing with Contains() or Containsonly() or Not() and so on
So if I am asking for too much sorry, but hey I already saw this community doing magic and stuff way more complicated.
Thank you so much for your help!!!
Table 1 - Monthly plane
https://coda.io/d/_dC4plSzRsc7/Untitled-page_suOyIE3V#Monthly-Plan_tubdvZXm
Hey there, it’s a bit difficult for me to follow what you are trying to achieve. It would be helpful if you explained what your ideal outcome is without mixing it with what you think the best solution is or what you have tried.
Did I understand it correctly that for each of the ‘Outside’ columns you would like to have a random ‘Games manual’ item, but following some criteria? Can you describe the criteria?
Hey Pablo!
Well actually not really sorry, I explained badly.
I only want a random result on 1 column (Outside 1 for exp.) and this will we automatically copied to the rest of the columns. (I managed to make this formula)
What i am missing now is that the formula for outside 1 which uses the Randomitem()
will have some filters. for example : Cant get an item from a list if it was in the last 14 days from current date or also filters from the second table (Games manual) such as “Adults” or “Categoria” and so on
Actually I now came up with an idea for maybe making the filters changing according to the necessity i need/want. Maybe it will be easier like this.
I made two (that i think later i can make more with the same idea) selec lists above related to the source table i wish to use for filters. Those I think it can relate the formula to those select lists and not the other table and to its current value
I just created a button called ‘New button’, that adds a ‘Game manual’ item to the row that was not already added in the last 14 days.
You were trying to iterate through the last 14 days but it was not necessary, just filtering those days and using them to filter ‘Game manual’ items that were not included on those days did the trick.
Also the ‘RefreshColumn’ formula is not needed in this context, it’s only to refresh columns coming from Packs.
Hope that helps,
Pablo
Awesome Pablo!!
Pablo i tried the button you made. Defenitly work better than mine but the filter is not working. Some results come up even in less than 14 days
Do you think we can now continue with complecting stuff?
I have the “Add Row” button just outside the table with the intention of adding rows from today to +30 days. I manage to get that and I added a filter that will prevent Duplicating rows. My problem is that thought the filter works i can´t an ForEach() in there so when ever the formula is encountering at least one row with the same date, the whole process “falls”.
P.s Do you think i can add “Activate()” to the new rows i make so like this it will activate the button you just did?
So let me rephrase that to see if I understand: You want to have a button that creates a row per day for the next 30 days if they don’t exist already. For each row you also want to press the button that assigns a random ‘Games Manual’ item.
I just created a button in your document that does just that called ‘Add 30 days’.
Hope that helps,
Pablo
Yupe thats the idea.
Your button sure does adds 30 days but it will duplicate rows if i press it again.
And yes if i could add a function that when the row is been made, the button is being pressed, that will best the ideal result.
You are right, I messed it up in one of the nested currentValues. But I fixed it and I think now everything works as expected.
Hey @Pablo_DV ,
Amazing!!!
Works very good !
Do you think I can get a bit greedy and challenge you with one more thingy?
Do you think we can make a filters inside the formula of the button in “Monthly Plan” that will be depended on the select lists above the table? so like that if needed you can change the filter of the button upon need and in an “easy” way
Just implemented it. Beware that if there are less than 14 items that fulfil the criteria, there will be some gaps because of the requirement of not repeating any game in the last 14 days.
Have fun with the games!
Pablo
@Pablo_DV AMAZING! works like a magic!!
Big thanks for all the help!!!
I hope it wasn´t too much to ask and also another thanks, I learned a lot during this process!