Actionfield with IdeaScript
and again...
Actionfield is a really nice toy to play with...
here is a short example
Sub Run_Actionfield
'declaration
'-----------
Dim sTableActionfieldMaster As String
Dim sTableActionfieldDetail As String
Dim sJoinFieldMasterDetail As String
sTableActionfieldMaster = ""
sTableActionfieldDetail = ""
sJoinFieldMasterDetail = ""
sTableActionfieldMaster = Dir(Client.Workingdirectory + "MasterTableName.IMD")
sTableActionfieldDetail = Dir(Client.Workingdirectory + "DetailTableName.IMD")
'Be careful:
'The JoinKey must exists in both tables !!!!!!!!!!!!!!!
'---------------------------------------
sJoinFieldMasterDetail = "JoinKeyNumeric"
Set db = Client.OpenDatabase(sTableActionfieldMaster)
Set table = db.TableDef
'sometimes it is better to first get as StringField (otherwise idea raise an error)
'and than the JoinKey Field (most times numeric)
'---------------------------------------------
Set field = table.GetField("StringField")
Set field = table.GetField(sJoinFieldMasterDetail)
'here is the point where the magic starts...
'---------------------------------
field.SetActionFieldForExtraction sTableActionfieldDetail, sJoinFieldMasterDetail, "", "", "", "", "", "", ""
db.Close
Set db = Nothing
Set task = Nothing
Set field = Nothing
sTableActionfieldMaster = ""
sTableActionfieldDetail = ""
sJoinFieldMasterDetail = ""
End Sub
that's it....
@brian:
would it be possible to deactivate the trim function when using plain text in your forum?
cheers,
chris
I just tried it and I I
In reply to I work for the german tax by groldi
I just tried it and I I couldn't get it to work in V9.1.1, let me know if you can get it to work. If not send a message to your IDEA distributor and I can send a message to IDEA here in Ottawa letting them know the problem.