- Joel McManness
- PowerBuilder
- Wednesday, 16 October 2019 09:07 PM UTC
Hi -
Is it possible to get the Last Modified Date property from objects in powerscript from compiled code (PBDs). Currently we are able to use LibraryDirectoryEx (below) to get it from PBL's but we would like to create something similiar for compiled code. Something where we are able to pass in the object name and it retrieves the last modification date. The purpose of this is to provide in-app version control of reports (datawindows) without having source code available.
Powerbuilder version 2017
Thanks
/* Get the objects per library */
lib_cnt = upperbound(s_library)
FOR i = 1 to lib_cnt
s_objectlist = LibraryDirectoryEx( s_library[i], DirAll!)
ds_objectlist.Reset()
obj_cnt = ds_objectlist.ImportString(s_objectlist)
s_libraryname = s_library[i]
0 then s_libraryname = mid(s_library[i], LastPos(s_library[i], '\\') + 2)
f_pp_msgs(' Extracting ' + string(obj_cnt) + ' objects from ' + s_libraryname )
FOR j = 1 TO obj_cnt
row = dw_objects.InsertRow(0)
dw_objects.SetItem(row, 'app_name', a_appname)
dw_objects.SetItem(row, 'library_name', s_libraryname)
dw_objects.SetItem(row, 'object_name', ds_objectlist.GetItemString(j, 'object_name'))
dw_objects.SetItem(row, 'last_modified', ds_objectlist.GetItemDateTime(j, 'last_modified'))
dw_objects.SetItem(row, 'comments', ds_objectlist.GetItemString(j, 'comments'))
dw_objects.SetItem(row, 'object_type', ds_objectlist.GetItemString(j, 'object_type'))
NEXT
NEXT
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.