I'm having a lot of trouble getting access to the data of the Plant Database in worksheet scripts.
For instance the following should return the 'Blooms Begin' field data
currentObject = vs.WSScript_GetObject()
#Record 1 is the handle to the Plant Record, Record 2 is the handle to the plant object associated with the record
vRecordHandle = vs.GetRecord(currentObject, 1)
All of the other database functions work however there does not seem to be any way to obtain the content via va.GetRField(). In the below loop all vFieldValue are blank
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
lgoodkind
I'm having a lot of trouble getting access to the data of the Plant Database in worksheet scripts.
For instance the following should return the 'Blooms Begin' field data
currentObject = vs.WSScript_GetObject()
#Record 1 is the handle to the Plant Record, Record 2 is the handle to the plant object associated with the record
vRecordHandle = vs.GetRecord(currentObject, 1)
vRecordName = vs.GetName(vRecordHandle)
bloomRecord = vs.GetRFieldOpt(vRecordHandle, vRecordName, "Blooms Begin")
vs.AlrtDialog("Blooms Begin: " + str(bloomRecord))
This returns nothing
All of the other database functions work however there does not seem to be any way to obtain the content via va.GetRField(). In the below loop all vFieldValue are blank
for vFieldID in range(1, vFieldsNum + 1):
vFieldName = vs.GetFldName(vRecordHandle, vFieldID)
vFieldType = vs.GetFldType(vRecordHandle, vFieldID)
vFieldFlag = vs.GetFldFlag(vRecordHandle, vFieldID)
vFieldValue = vs.GetRField(vRecordHandle, vRecordName, str(vFieldName))
vMessage = "Record: " + vRecordName + "\nField : " + str(vFieldID) + "\nFieldName: " + vFieldName + "\nFieldType: " + str(vFieldType) + "\nFieldFlag: " + str(vFieldFlag) + "\nFieldValue: " + vFieldValue + "\n"
#vs.AlrtDialog(vMessage)
Edited by lgoodkindLink to comment
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.