0

嗨,我有一个名为“SiteOfClinic”的参数,其中列出了几个站点

  1. OHH YAC
  2. DHH 佩德斯
  3. QHH YAC
  4. TRP 垫
  5. MJH 佩德斯

到目前为止它工作正常,但现在我想将前两个(选项 1 和 2)组合在一起,所以我创建了另一个标签“OHH YAC/DHH Paeds”,但我不知道在表达式中添加什么来组合两者。

我尝试了以下但不成功

=SPLIT(JOIN(Parameters!HospitalSite.Value,"'OHH YAC,DHH Paeds"),"'OHH YAC,DHH Paeds")

=JOIN(Parameters!HospitalSite.Value,"OHH YAC,DHH Paeds")

请帮忙,非常感谢。

4

1 回答 1

0
>> ' Assuming "SiteOfClinic" (aka "Parameters!HospitalSite.Value")
>> ' is an array containing 3 string values:
>> SiteOfClinic = Array("A 0", "B 1", "C 2")
>> ' and you want an array holding the first two items, you have to create a copy:
>> Copy = SiteOfClinic
>> ' and keep just the first two items
>> ReDim Preserve Copy(1)
>> ' Use Join(array, separator) to build a string from Copy
>> s = Join(Copy, "<>")
>> WScript.Echo s
>> or Split(string, separator) to get an array from s
>> a = Split(s, "<>")
>> WScript.Echo CStr(UBound(Copy)=UBound(a)), CStr(a(0)=Copy(0))
>>
A 0<>B 1
True True
于 2012-06-26T06:59:57.317 回答