Check table list view to make sure value isnt chosen yet - then do not allow the new entry

I have a table. Inside the table i have a full list of possible values to choose from. After the user chooses from the list - i want that value:

Taken out of the list
Not to be an option in the table anymore (so there is NO chance of adding the same field twice)

Do i write this expression in the Behavior -->> Action?
Or do i write it in the data set "formula?

Any thoughts?

To be clear - I do not want the actual Row value inside the table deleted. I just want the user to NOT be able to select that option twice.

A data table? A slice? Or a view?

In a table view? Or in a form view?

As an inline view? Or a dropdown menu?

Data Table

Table View

Inline Button

So here is my app With the issues i am having:

This is my table showing this weeks games with all appropriate data (columns):

I want to be able to (by using this table):

  • Pick a Game (matchup this week)
  • Choose players from only that game you chose ( these players need to be choosen by category. My lineup can only have so many players chosen of a certain category) for example - only one QB.
  • Put those players in my lineup table

Here is what the app looks like so far:

After you have chosen the games you want to choose your players from - i want the user to be able to see ONLY the players playing in those games by clicking on “Games” - button at the bottom. Then i want the user to choose from that list of games - the players they want to place in their lineup - “Final Lineup”:

I would guess that you will need a have your users go through a series of “detail views” in which the enum function is used to make selections:

  1. Detail view to select game from a list of choices. After this the user is shown . . .
  2. Detail view to select players from that game (the enum is made up of the players on those two teams). After this the user is shown . . .
  3. Table view of players chosen.

Are you familiar with enum? I think that function will be key to accomplishing your goal.

Yes I understand enum. I do have a question about that. Is there a way to bulk add enum? I have 32 teams and about 300 players.


Kirk_Masden

Regular

December 18
I would guess that you will need a have your users go through a series of “detail views” in which the enum function is used to make selections:

  1. Detail view to select game from a list of choices. After this the user is shown . . .
  2. Detail view to select players from that game (the enum is made up of the players on those two teams). After this the user is shown . . .
  3. Table view of players chosen.
    Are you familiar with enum? I think that function will be key to accomplishing your goal.

I think so. Here’s an image from an app of mine:

Screen Shot 2019-12-18 at 22.14.36

In this app, the “tags” are typed into individual records my the user. Then the app automatically collates all of the tags that have been entered and displays them in this format. So, if the user adds a new tag, it will be added to the list of tags to choose from. When the user chooses a tag, the app displays only those records that have that particular tag. I think this approach would work for you.

My problem is that, I figured out how to do it on my app a long time ago but I can’t find a appropriate sample app for you. Here are some images from my app editor:

I think you’ll want the column type to be “Enum”, the base type to be “text”, and then you can choose the display type you like.

Then, you need to make a formula that makes a “list” of all of the teams (or, a “list” of all of the players on a team) and put that it the Valid if slot:

I hesitate to show the whole expression I made because it’s quite unique to my circumstance and therefore might be more confusing than helpful.

I looked for a good sample app that shows how to do this but could find a good one. I think I need to help. @Steve, @LeventK, @Aleksi . . . can you point us to a good source (sample app or documentation page, etc.) that can help Tiger here. I learned how to do it on my own app earlier this year but I’ve forgotten how I learned.

So i would not have to enter EACH player or team into the enum? By using your count((selectXXX[tag] expression?

Yes. In other words, if all of the data is in a table, a SELECT() expression could be made to create a list of that data (all unique names of teams or all unique names of players on a particular team), and then that list would be the enum that users chose from. So, if a team or a player is added to or deleted from your data, the enum would automatically change as a result. This is the way the “tags” on my app work. I just need to help from other experts here to explain to you how to do it.

i gotcha…

Thanks!

where do i put the select expression? in which tables? and where?

Hi @Tiger!

It was quite difficult for me (my skill level is a lot lower than I thought) but I made a little demonstration app for you (“Enum practice”).

https://www.appsheet.com/portfolio/230844

It’s more complicated than I expected (I had some unexpected difficulties). I hope to get some help from other people in this community later about better ways to do this but, for now, the app I made works.

The dummy data has “gender” as the category that would be like “Team” in your app. Then, it shows people who belong to that category and you select the people you are interested in from there.

I’m afraid I won’t be able to answer many questions about this. I’ve wound up spending way too much time on this. That not your fault – just my own issue. I got in over my head on this one.

Here’s another sample that might help you in your project:

https://www.appsheet.com/samples/Custom-search-with-multiple-criteria?appGuidString=5532a3bc-b055-4876-b5cc-b6959c73ca67

Source: Search multiple columns with different criteria

Thank you very much

1 Like

Sure. Good luck!