Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

SRP_JSON objects within an array

2»

Comments

  • OK, I see I just need to pull some of the code from that routine and create my own build.
  • Matt,

    Not tested yet, but does this look right?
    BuildAMvGroupDef: ServiceKeyID = Service : '*' : SRP_Hash(TableName : 'AMvGroupDef', 'SHA-1', 'BASE32') AMvGroupDef = Memory_Services('GetValue', ServiceKeyID) If Len(AMvGroupDef) EQ 0 then AMvGroupDef=null$ Fields=xlate(TableName,'%FIELDS%' ,'','X') AllColumnNames = Fields<FIELDS_NAME$> AllGroupNames = Fields<FIELDS_MV_GROUPNAME$> NumColumns = DCount(AllColumnNames, @VM) For ColumnCnt = 1 to NumColumns ALLColumnName = AllColumnNames<0,ColumnCnt> AllGroupName = AllGroupNames<0,ColumnCnt> if AllGroupName<>'' then locate AllGroupName in AMvGroupDef<1> setting AmvGroupPos then AMvGroupDef<2,AmvGroupPos,-1>=ALLColumnName end else AMvGroupDef<1,AmvGroupPos>=AllGroupName AMvGroupDef<2,AmvGroupPos,-1>=ALLColumnName end end Next ColumnCnt Convert @Upper_Case to @Lower_Case in AMvGroupDef end return
  • Whoops, seen I missed
    Memory_Services('SetValue', ServiceKeyID, AMvGroupDef)
  • All working, thanks Matt, again.
  • Good stuff! :)
Sign In or Register to comment.