Hi Pierre,
When items are added through the "add item" dialog, some row equations work (if you tick a due date, the urgency field will be updated), but others don't. (And of course, row equations work when data changes are performed inside the grid.)
==============
I wrote a small script to filter
WikiTags
and copy certain strings to another field : TypeDocBib.
The idea is
to enter all my data in the WikiTag field and let IQ take care of all the dispatch details... Unfortunately, it's not happening : row equations aren't performed when items are added to the DB using the "add item" dialogSteps to reproduce the problem in a sample DB.
1- Copy that function in the "user code" or " This Database" section of the VB editor of a sample DB.
Function SearchAndConcatPattern (SourceField, RecepField, RegexPat)
Dim re, objMatch, colMatches, sMsg, x
Set re = New RegExp
re.Global = True
re.Pattern = RegExPat
s = SourceField
Set colMatches = re.Execute(s)
sMsg = RecepField
For Each objMatch In colMatches
x= objMatch.Value
If InStr(RecepField,x)=0 Then
sMsg = sMsg & x
Else
sMsg = sMsg
End If
Next
SearchAndConcatPattern = sMsg
End Function
(What that function does is that it finds some string based on the regex pattern provided, and the instr() "search results" -- and concatenates them, ready to be used in some other field or whatever)
2- In the "Notes" field, add this row equation :
SearchAndConcatPattern
(WikiTag, Notes, "([x][a-zA-Z]*[-])")
3- In the inbox grid add a "WikiTag" and a "notes" column (just use the fields from the sample DB)
Now that everything is set, do this :
4 - Create an item in the inbox grid, and write Hello my friend xNO-xAR-xPW- in the WikiTag field. If you followed the previous steps carefully, only xNO-xAR-xPW- should appear in the "Notes" field
5- Now add an item to the DB using the add item window : a- Write anything you want in the item text box, b- but tick the inbox check box and c- write Hello my friend xNO-xAR-xPW- in the WikiTag section.
6- Back to the grid : a- refresh the inbox grid, b- the new item has Hello my friend xNO-xAR-xPW- in the WikiTag field, but... There's nothing in the Notes field. And there should.
Conclusion : at least some field row equation aren't be performed, and appropriate calculation, data transfer, etc. won't happen.
The fact that row equations/function don't always work when using the add item dialog is a big problem as that was the main reason why I wrote these functions etc. : so that I don't have to open the properties pane to fill other fields, and just use the WikiTag field to fill other fields.
Comments