playing with arrays
How can you do that ?
5 replies
-
Interesting question. The way I would go about it is to create a child table that stores the input, corresponding field, and the column/row/small square info.
Trying to search all of the fields individually would be a nightmare to code. With a child table you can quickly search for all row1 input, then all column2 inputs, then small square1 inputs and do a unique() of the returned values and you should get all of the available choices.
You would have a trigger after update on each square that would create/delete records in the child table.
You could also have a button at the bottom that allows you to lock in the initial numbers so you don't accidentally change them. After you input the initial numbers, you press the button to "Lock", or whatever you want to call it, then that would set a subsequent yes/no in all records of the child to "Lock". Then you set the writable if of the fields in the parent to look into their corresponding child record for NOT "Lock". Or something like that.
It may sound complicated, but it is way easier than scripting the search of 81 fields.
It is a very interesting example for a DB. Please keep us updated on your progress.
-
Or instead of creating/deleting child records with each input/deleting of value, the Lock button could create all child records necessary (since you need them all), then only lock those with data.
Which then changes the Trigger to just a copy of data to corresponding child record.
-
Here is a mock up.
There isn't an easy way to do create an interface that you ask for. You can either have an input field or a formula field, but not one that can do both. So that is why I create the bit on the side where you select the row and column and it will tell you what is possible.
Content aside
- 5 mths agoLast active
- 5Replies
- 54Views
-
2
Following