1. David Vasconcelos
  2. PowerServer 2020 or older (Obsolete)
  3. Wednesday, 18 July 2018 16:35 PM UTC

Trying to convert PB to Appeon Web... does anyone know if Message.POPARR[] is unsupported?  Can't find any info on it and it's seems to not be working.

 

Looks like the app is using a custom message object...and POPARR[] is type PowerObject.

 

So my revised question is can a powerobject be an array?

I.E.   PowerObject POPARR[]

 

FYI.. Turns out this is unsupported.

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 17:53 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi David;

       Please open your ticket through the standard support mechanism and then select PowerServer as the product type. Appeon will then process your issue according to your organization's support priority and paid support level of service holds.

      Sorry for the slow reply.

HTH

Regards ... Chris

 

 

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 15:41 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

1 workaround you can try is create a nvo that has the array as an attribute, and just pass the object.  I would imagine that should work based on the info you supplied.  I created an object, n_map, that simulates a java map.  It's a standard nvo, and has an array of objects as an attribute.  The array is another object I call n_namevalue and has 2 attributes - string "key" and any "value".  I have the standard get and put methods, as well as FindByIndex and FindByValue to get the unique n_namevalue object you need, and then a GetValue method on the n_namevalue to get the actual object, which can be anything.  This may be a little overkill for what you need, but I could send it to you if you wanted.  As I mentioned, you can just also create a basic nvo and have an array on it, which you should be able to pass.  Good luck and let me know if that doesn't work, or if you want my map object(s).

 

Kevin

Comment
  1. David Vasconcelos
  2. Thursday, 19 July 2018 16:22 PM UTC
Thanks Kevin, I figured out a workaround for now, but will wait a bit to see if Appeon comes back with a fix ASAP.

Basically all did was replace the direct assignment of the array varable (unbounded) and did a loop and assigned each array directly.

I.E instead of this

array[] = array1[]

id did

FOR li_loop = 1 to Upperbound(array1)

array[li_loop] = array1[li_loop]

next

  1. Helpful
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 14:55 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

We pay for support.  Would logging the bug be different then the "standard Support" link you sent me?

Comment
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 14:47 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

Chris, we pay for support.  Would logging the bug be different then the "standard Support" link you sent me?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 14:30 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

Hi David;

POPTest[] = s_simple_arr[]  

     I tested the above code this AM in PS 2017 using the Web debugger and it does not work! You are 100% correct. The code does not throw an exception either.  frown

I also tested ...

POPTest = s_simple_arr 

    This code does not work either.  frown

Please open a support ticket for this issue as it does work in native PB.

Regards ... Chris 

Comment
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 13:21 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 6

After a bunch of testing here is what I found and easy to reproduce...

 

PowerObject array is supported but there is a catch..  If you pass array to it as open ended

I.E.

Powerobject POPARR[]

s_structrue ls_str[]

set info into structure

POPARR[] = ls_str[]    //this does not work.

POPARR[1] = ls_str[1] //this does work,

 

Looks like you have to quantify the passing in the array vs passing it without quantifying it.

Chris if you could please confirm,  Below is script you can copy/paste to test. Let me know your results

PowerObject POPTest[]
s_str_test s_simple_arr[], s_new_arr[]

//Structure definition
//s_str_test 
//  string s_string
//  string s_string2
//  Long l_number

 

s_simple_arr[1].s_string = 'test1'
s_simple_arr[1].s_string2 = 'test1'
s_simple_arr[1].l_number = 1234

s_simple_arr[2].s_string = 'test2'
s_simple_arr[2].s_string2 = 'test2'
s_simple_arr[2].l_number = 1234

//this does not work
POPTest[] = s_simple_arr[]  

//this does work
POPTest[1] = s_simple_arr[1]
POPTest[2] = s_simple_arr[2]

s_new_arr[1] = POPTest[1]
s_new_arr[2] = POPTest[2]

 

 

Comment
There are no comments made yet.
Appeon Support Team Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 02:03 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 7

Hi David,

The powerobject array is supported. We’d recommend you to open a ticket in the Appeon ticketing system at https://www.appeon.com/standardsupport/ and attach a PB sample that can reproduce this issue so we could have a closer look at it.

Regards,
ZhaoKai

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 21:36 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 8

Hi David;

      The PowerBuilder Message object only has one singular element defined as PowerObject. Looks like your PB App might have sub-classed the Message object and the descendant has added another PowerObject property as an array.

Can you confirm the above?

Regards ... Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.