- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello again @WCrihfield
I do want the iproperty to be created even if the field has nothing (it will probably be filled eventually)
For some reason the same error keeps popping up. I'm not sure anymore about what is happening, so I tried to msgbox everything (I tried with logger.info as you suggested, but It gets to msgbox 13 and then it just sais "some info" I've been searching trought the internet and read about the levels of info, but I don't really get how to use it well)
For context, the file in wich this is being tested right now has a SH_DATE_MODIF value of "", and a pre-existing "FECHA REVISION" in 'Date' mode
Case "SH_DATE_MODIF"
Dim bFoundRev As Boolean = False :MsgBox("1")
Dim dModifDate As Date : MsgBox("2")
Try : oCProp = oCProps.Item("FECHA REVISION") : bFoundRev = True : Catch : End Try : MsgBox("3")
If IsNothing(oCProp) Then : MsgBox("4")
If sValue = "" OrElse IsDate(sValue) = False Then : MsgBox("5")
Try : oCProp = oCProps.Add(sValue, "FECHA REVISION") : Catch : End Try : MsgBox("6")
ElseIf sValue <> "" AndAlso IsDate(sValue) = True Then : MsgBox("7")
Try : dModifDate = Convert.ToDateTime(sValue) : Catch : End Try : MsgBox("8")
Try : oCProp = oCProps.Add(dModifDate, "FECHA REVISION") : Catch : End Try : MsgBox("9")
End If : MsgBox("10")
End If : MsgBox("11")
If bFoundRev = True Then : MsgBox("12")
If sValue = "" OrElse IsDate(sValue) = False Then : MsgBox("13")
If oCProp.Value <> sValue Then Try : oCProp.Value = sValue : Catch : End Try : MsgBox("14")
ElseIf sValue <> "" AndAlso IsDate(sValue) = True Then : MsgBox("15")
Try : dModifDate = Convert.ToDateTime(sValue) : Catch : End Try : MsgBox("16")
If oCProp.Value <> dModifDate Then Try : oCProp.Value = dModifDate : Catch : End Try : MsgBox("17")
End If : MsgBox("18")
End If : MsgBox("19")
The results I get are:
1
2
3
11
12
13
error
Not sure if this will help you figure out what's wrong, but I hope so.
If I comment out this case, the code seems to work so the error must be in there somewhere.
And don't worry @WCrihfield , I was actually kind of enjoying this, cause I'm learning and being able to do certain things with the ilogic has proven trully useful to me, but if you are in a hurry you don't need to clarify everything, I will eventually figure out myself what the code does