Public Function Of_ordering_getmiditem (string as_instr,string as_key) returns string
String As_instr
String As_key
Long Ll_pos
Long Ll_find
String Ls_pos
String Ls_midright
String Ls_item
String Ls_col
String ls_temp
String Ls_ret
Datastore Lds_unicode
Ls_pos = "~" "+ As_key +" ~ "+": "
Ll_pos = pos (as_instr,ls_pos)
IF ll_pos > 0 Then
Ls_midright = Mid (As_instr,ll_pos + len (ls_pos))
IF Mid (ls_midright,2,1) = "[" Then
Ll_pos = pos (Ls_midright, "]")
ELSE
Ll_pos = pos (Ls_midright, ",")
IF ll_pos > 0 Then
ELSE
Ll_pos = pos (Ls_midright, "}")
END IF
END IF
IF ll_pos > 0 Then
Ls_temp = Left (ls_midright,ll_pos-1)
IF Left (ls_temp,1) = "~" and then
Ls_temp = Mid (ls_temp,2)
END IF
IF Right (ls_temp,1) = "~" and then
Ls_temp = Left (Ls_temp,len (ls_temp)-1)
END IF
Ls_ret = Ls_temp
ELSE
IF Left (ls_midright,1) = "~" and then
Ls_midright = Mid (ls_midright,2)
END IF
IF Right (ls_midright,1) = "~" and then
Ls_midright = Left (Ls_midright,len (ls_midright)-1)
END IF
Ls_ret = Ls_midright
END IF
ELSE
Ls_ret = ""
END IF
Ll_pos = pos (lower (Ls_ret), "\u")
IF ll_pos > 0 Then
Lds_unicode = CREATE datastore
Lds_unicode.dataobject = "Dw_unicode"
Do While Ll_pos > 0
Ls_temp = Upper (Mid (Ls_ret,ll_pos + 2,4))
Ll_find = Lds_unicode.find ("Left (unicode_no,3) = '" + Left (ls_temp,3) + "'", 1,lds_unicode.rowcount ())
IF ll_find > 0 Then
Ls_item = Lds_unicode.object.unicode_item[ll_find]
Ls_col = Upper (Right (ls_temp,1))
CHOOSE Case Ls_col
Case "A", "B", "C", "D", "E", "F"
Ls_item = Mid (Ls_item, (ASC (LS_COL) * 2-110) + +)
Case ELSE
Ls_item = Mid (Ls_item, (Long (ls_col) * 2) + +)
END CHOOSE
Ls_ret = replace (Ls_ret,ll_pos,6,ls_item)
END IF
Ll_pos = pos (lower (Ls_ret), "\u")
LOOP
DESTROY Lds_unicode
END IF
RETURN Ls_ret
HTTP request Of_ordering_getmiditem