1. David Vasconcelos
  2. PowerBuilder
  3. Thursday, 28 June 2018 16:33 PM UTC

When you have a modify statement and need multiple Tilde's I.e  "~t" if you have "if" statements for attributes or strings ~".  

In one of the Appeon docs it's mentions

"Tilde ("~") on the web may not take effect if it is contained in a nested string that is a variable or it is contained in a string whose nested level is up to two." as unsupported.

The following statement does not work in the web (but works in PB native) I am assuming its not working because of the multiple Tilde's.

 sCollapsedExpression = sValueColumn + "=~"" + sValue + "~"" 
 sExpandedExpression = sValueColumn + "=~"" + sValue + "~""

   sModify = "create bitmap(band=detail x='0~t(((" + islevelcol +  &
     " - 1)*"+isBMPWidth+") + " + isBMPX + ")' y='0' " + &
      " height='" + sLevelHeight + "' width='" + isBMPWidth + "' " + &
     ' filename= "' + sExpanded + '" ' + &
     " visible='0~tif(((" + islevelcol + " = " +  &
     string(iLevel) + ") and (expanded=1) and (" +  &
     sExpandedExpression + ")),1,0)' " + &
     " name= " + sBitmapName + " )"

Is there a work around for tilde's or how can this be handled?

PB2017 R1, PowerServer 2017, Win10.

 

Accepted Answer
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 28 June 2018 21:48 PM UTC
  2. PowerBuilder
  3. # Permalink

The Tilde is a PowerBuilder-specific delimiter, and thus is not read by any other application as anything but a character.

If you want to use this string in a setting/environment/program other than PowerBuilder, you will need to strip the tildes from the string(s) and insert any appropriate delimiters before submitting the string for processing.

Olan

Comment
  1. David Vasconcelos
  2. Friday, 29 June 2018 09:55 AM UTC
Olan, thanks for the reply but I am stilled puzzled to I replace "~t" which is a tab character with he acii value of a tab character, is that what you mean or am I not understanding?

  1. Helpful
  1. David Vasconcelos
  2. Thursday, 19 July 2018 14:09 PM UTC
Turns out in my case it was not the tilde... it was the Create statement. The create statement was creating a bitmap but I used the same object name, since this was in a loop it would create the object with the same name several times. PB2017 for some reason allowed it but Appeon Web did not. Once I changed the code so that each bitmap object would have its own unique name it worked.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 19 July 2018 14:39 PM UTC
Thanks for the feedback David!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 29 June 2018 00:36 AM UTC
  2. PowerBuilder
  3. # 1

Hi David;

   From the PS Help file ...

HTH

Regards ... Chris

Comment
  1. David Vasconcelos
  2. Friday, 29 June 2018 09:56 AM UTC
Thanks Chris, what you highligted is what I pasted on my question.  How do you replace the tilde so that it works in the web world?

  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 29 June 2018 13:41 PM UTC
Hi David;



  The only thing that I can think ot at the moment (I have not tried this personally) would be to  ....





Use a symbolic replacement character in the DW syntax (ie: %tilde%)

Assign the symbolic DW syntax to your sModify variable and further annotate as normal

When the sModify variable is ready for the DW.Modify() - run PowerScript code to replace all %tilde% with "~t"





HTH



Regards ... Chris

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.