How prevent values duplication in table ? #196
-
How to remove a value from the tablefields if it has been added to the table or marque a field Machine unique to prevent values duplication ?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
you can add a hidden expression field where you analyse the table data to a true / false and then use that field as validation on the table |
Beta Was this translation helpful? Give feedback.
-
I believe this is what you want. I used several expressions for ease of reading, but you can merge them if you want. First I define a list Then I make 2 expressions : one making a list of the ones in your table (usedMachinelist), and then the ones not yet picked in the table (unusedMachinelist) => by substracting the used ones from the list. We make a table field The table field machine uses the But let's go a little further. Let's assume you have manual input, you also want to be unique. Another 2 expressions Greetings from Ibiza :)
|
Beta Was this translation helpful? Give feedback.
I believe this is what you want. I used several expressions for ease of reading, but you can merge them if you want.
Don't worry about speed, all the expressions are run local, so speed will be okay.
Let's go over the steps
First I define a list
machineList
(with an expression) => you could load this from rest, from a file, ...This holds our list of machines.
Then I make 2 expressions : one making a list of the ones in your table (usedMachinelist), and then the ones not yet picked in the table (unusedMachinelist) => by substracting the used ones from the list.
We make a table field
machines
The table field machine uses the
from
property to use a dropdown list from an outside epxression …