Submitted by Armando on 2010/02/25 01:55
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" dialog
 
 
Steps 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

I haven't got feed back on this one, but it's a pretty big issue -- users have to manually recalculate row equations if they aren't performed. (Like I said, some seem to happen, and I have no idea why, but others don't and should).
 
Can that be confirmed or should I just enter it in Mantis regardless ?
 
Pierre ??

Tom

2010/03/04 12:53

In reply to by Armando

 
I only have very simple row equations - tick here adds date there - I just tested & they seem to work okay from the add new item dialogue
 
They seem to get stuck if I tick, then untick, then retick - third tick doesnt work - but that's like a different problem which might not necessarily be IQ's fault
 
Would it take a lot of work to test this in clean install & new database ?
 

Armando

2010/03/04 15:11

In reply to by Tom

[quote=Tom]
 
I only have very simple row equations - tick here adds date there - I just tested & they seem to work okay from the add new item dialogue
 
They seem to get stuck if I tick, then untick, then retick - third tick doesnt work - but that's like a different problem which might not necessarily be IQ's fault
 
Would it take a lot of work to test this in clean install & new database ?
 
[/quote]
 
 
Thanks Tom. I'll try to do some testing in another DB. But it seems to me that if it works when the item is created in the grid, it should when using "Add item".

I extensively edited the first post, with all the steps to reproduce the problem in a sample DB.
 
This too is an important problem as it affects data integrity (and unless one takes the time to review all items at the end of the day and manually correct mistakes, items won't carry the data they should carry).
 
Thanks for looking into this.

OK got it. The Wikitag field update was set to not process equations. This is now fixed.
 
Thanks for such detailed instructions !
 

Armando

2010/03/10 16:28

In reply to by Pierre_Admin

[quote=Pierre_Admin]
OK got it. The Wikitag field update was set to not process equations. This is now fixed.
 
Thanks for such detailed instructions !
 
[/quote]
 
Thanks a lot !