1. Thomas Rolseth
  2. PowerServer
  3. Tuesday, 14 June 2022 15:39 PM UTC

I’m getting errors when building a PowerServer 2021 project for a client application – see attached.  Apparently, you can’t have duplicate objects in different libraries.  It looks like PowerServer doesn’t know which one to parse when that is the case and the creation of the Web API fails.  This is a problem for our clients as some have updated versions of objects in a 'custom' pbl that is at the top of the library list.  For example, we might take a datawindow from another pbl further down the library list, customize it and save it to the custom pbl.  That leaves you with two copies of that datawindow and will cause an error during the compile.  Is there a workaround for this?

Thanks, Tom

Attachments (1)
Accepted Answer
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 15 June 2022 03:30 AM UTC
  2. PowerServer
  3. # Permalink

Hi Thomas, 

Although there are build errors for the duplicate objects, the PowerServer application can still generate successfully.  Only the first object (DataWindow) encountered will be used.

We tag such occurrences as "errors", because it is important for the user to check and make sure the duplicate objects won't mess up the existing business logics.

Best regards, Julie

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 14 June 2022 16:07 PM UTC
  2. PowerServer
  3. # 1

Hi Tom,

This is documented restriction for automatically generating the C# Web API: https://docs.appeon.com/ps2021/bk06ch04.html

The direct workaround would be to not have duplicate names.

The only other workaround I can think of is that you look into dynamically creating the DataWindow during runtime so the parser won't have to parse it.

Best regards,
Armeen

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 June 2022 21:39 PM UTC
They are errors but can be taken as a warning. PB2022 is better at isolating these DW duplicated within it's own tab in the IDE's output area.
  1. Helpful
  1. mike S
  2. Wednesday, 15 June 2022 01:47 AM UTC
to me an error is something that aborts the process - such as the deployment of the powerserver application. From what you are saying, it uses the wording 'error' but in fact is a warning in that it does generate the powerserver application correctly? And thus the OP's problem that " the creation of the Web API fails" is something not related to the duplicate datawindows?
  1. Helpful
  1. Thomas Rolseth
  2. Thursday, 16 June 2022 15:19 PM UTC
The correct datawindows were used in building the models and web api was created. I was just thrown off by the 'error' term in the output window. I'll flag this as resolved but it would be good to have this handled more gracefully in PB 2022. Sounds like that is the plan based on Chris's comment above.
  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.