On Import of CSV, basic data validation
On Import of CSV, basic data validation
bfarkas
Posts: 181Questions: 48Answers: 0
I am trying to think of a good way to do some basic validation, such as a simple regex edit on a phone field to eliminate all non-number characters, while the data is being brought into the table. Since these are multi-edits, it would need to just edit the offending data, so keeping them basic is key and fine.
Anyone have a good idea for how to approach or an example doing anything like this?
This discussion has been closed.
Answers
Thinking about this more, I am wondering if i should do it as a function that is run anytime rows are added to the table, and then I can be column specific, which makes it a bit universal and eliminates the complexity from different types and orders of data coming in.
So it would be a matter of whenever a new row is entered regardless of addition method running a check like below on specific cells by column:
Thinking I can do something like this on the preCreate event, and fortunately with the import process, a separate editor is being used, so can define the rules for just that editor no?
I think progress. I am doing this:
But it seems the value i snot being passed into the function. I think i am selecting incorectly for the checkPhone variable. What am i missing?
Nvmd, this is working now. I was mapping the wrong field from my csv file during the test.