Questions regarding Validation rules

Bauer

Well-Known Member
I have a few quick important questions.
  1. Is any validation done when CSV import is used? i.e. will any validation rules set for the elements/columns be checked as new rows are imported?
  2. Is there any way to validate an entire list without opening each row for editing?
  3. If not, has anyone ever tried writing a script (or know of some php tweaks I could make) that would run the validation rules on each element in each row in a list?
What I'd like to do is add a flag field to the list that would provide an overview of any rows that have invalid data (like perhaps highlight the invalid cells with a red border).
 
I assume there's no element validation done (what should it do?).
But there's a list plugin to handle data during import http://fabrikar.com/forums/index.php?wiki/list-csv-list-plugin/
Well, in a perfect world, it should run the element validations on every row imported - just as if the user had opened that row for editing in form view, no? Otherwise, what's the use of setting up all those individual element validations, and then using the CSV Import option? They're then worthless.:(

As I have explained before, the key list in my project is a survey that collects basic, mostly numeric, data and is presented to the user via a Fabrik list that uses the InlineEdit plugin - with the option to Export/Import to an Excel spreadsheet to 'work offline'. There are about 50 columns in that list, though only about 7-10 of them are shown to the user for editing - as the list rows and columns are prefiltered, depending on the type of survey.

Most all of the columns have validation rules - mostly that they must be > 0 , x > y and x < z - etc. I also need to count that a minimum number of rows contain valid data or that certain rows have/must be filled-in with valid data before the survey can be considered complete and acceptable.

I was working at testing the inline edit plugin with validations last night - and the validations are being run. However the ajax spinner freezes with a mootools error about a 500 Error on the server - so there is some tweaking that needs to be done there in order to get that working correctly. But that still doesn't address the validations for the import of a 'Work Offline' spreadsheet.:confused:

I'm just trying to decide what would be more work. Hard-coding a validation routine that would get run on the entire list, or fixing Fabrik so that it runs the validations at the element level after CSV import? I guess I'm just looking for a clue as to where that would best be handled, or perhaps some help with doing that.;)
 
Last edited:
Maybe you can "call" the element validation in your list import script...

"Freezing ajax spinner": did you try to set the error reporting to none?
 
Yes I did. It turns out validations are failing even when the data entered is valid.
See the new post I made regarding the Inlinedit plugin. And please let me know if you can duplicate.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top