Highlighted
Absent Member.. Absent Member..
Absent Member..
202 views

Array of structure not being generated correctly.

Hello experts,

 

I'm having some trouble and could use some help, I've recently tried to create the following structure in dbdict, in the request table:

 

CPE - array

    CPE  - structure

            tip -character

            Model - character

            serialNumber - character

            CPEstatus - character

            status - character

            Response - character

            SubTip - character

            Equipment - character

 

This structure was generated using the SM Windows Client, it appears in dbdict, and i'm showing the data saved in this structure using a form table, with 8 columns.

I have two problems:

1. The Model and status fields within the structure don't appear to save any data, I've tried inputing data from the client and by using web services.

Manually inputing the data and then saving will display my new values, but once i exit the record and search for it again those fields will be empty, while using web services the response i got from the server for those fields after doing a UpdateRMRequest is null. 

Seeing as how these fields are stored in a blob i can't really modify them, how could I go about to fix this?

This may be a bug.

 

2. In my form table, similar to the table that is displayed when searching for requests, how do I go about processing the information from a selected row ?

Lets say i have 3 entries in my CPE array, that means my table will display 3 rows, if i select the second row, i want to be able to somehow access the information from all 8 columns of that row, any ideas on how i might accomplish this?

 

Thank you and have nice day !

            

 

 

0 Likes
7 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Array of structure not being generated correctly.

I don't know which Service Manager Version you're using.

In SM9.40 OOB you can use dbdict "device" and arrayed structure "support.contacts" as example.

Format "configurationItem" shows all columns in a "Table" property.

 

First you need to ensure that you can enter and save data to all the fields via Database Manager.

If that works and the data can be stored successfully, what means that after save and opening the record again the data is still there, then you can test with WebServices access to that fields. To be honest, I did not try to fill arrayed structure via WebServices and I don't know exact format of that request.

 

Did you check in your format if the columns for "Model" and "Status" contain the correct field names ? The field names are case sensitive !

 

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Array of structure not being generated correctly.

Hello and thank you for replying,

 

I'm using SM 9.40, I've checked and the field names are ok in the form, however now it seems if I input data manually it seems to be saving it?

I've tried using web services and got the same result though, data not appearing in the table.

 

I've attached a photo, how could i extract the information from the selected lline?

 

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Array of structure not being generated correctly.

Hi,

 

Could you clarify a bit for us.  As I read through this I can see a few steps we need to build out the use case. So:

 

1.  You create an array of structure.  This is clear from the screenshot.

 

2. You create some forms to edit the array of structure.  Could you unload and attach those?

 

3. On editing the structured array you find model and status fields entered on the form are not being saved into the database.  Is that right or is that still not working?  I was not sure from your last comment (if I input data manually it seems to be saving it?)

 

4. Once you have the data in the structured array you want to be able edit individual items from any structure within the array.  This should work, if it is a blob it just means you have to retrieve all the data, change it and save the whole lot back.  If you plan on having a lot of data searching and updating can be more efficient if you convert the blob to a muti row array table.

 

So assunming I got all that right could you give us an explicit use case with steps to set up the array and form and then then steps to test data entry, retrival and update.  It seems to me we need to work though getting the SM piece correct first and once that is working OK we can start looking into the web service calls.  Again the web service will retrieve the structure array as one item (I don't recall exactly the format and that will depend on whether SOAP or REST).  Accessing individual elements will need to be done in client code so for this can you again provide some detail around where the web service request will come from and the implementation.  Is this coming from SM or another app? is the client custom code within an app, standalone etc.  So for example if you retrieve the request from another app you will need to use the script language from that app to parse the JSON.  If you give us some detail we can try to help.

 

So in summary, could you:

 

1. Clarify the issue as I discuss above.

2. Give us more explicit use cases to demonstrate the issue.

3. Describe a bit more the data retrieval requirement via web services so we can better understand how to help

 

Thanks!

 

David. 

 

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Array of structure not being generated correctly.

I don't think this is related to the array of structure being mapped to a BLOB: The SM RTE is involved, so it is able to do the mapping.

 

What I'd be interested in is the extaccess record: What do you see at the fields tab?

In OOB device dbdict, there are already two fields (model and istatus) with caption "Status" and "Model" for the web service integration.

 

So, I'd like to see both the WSDL generated of the extaccess record (i.e. http://<smserver>:<port>/SM/7/ConfigurationManagement.wsdl) and an example request by which you can reproduce this issue.

 

 

 

 

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Array of structure not being generated correctly.

re posting the multi array table conversion post as Armin overwrote it 😄  I agree with him that this is not root cause, I post because if you are going to make a lot of access to data inside the array you may want to add indexes for searching and that is not possible for data held in LOBs

 

https://softwaresupport.hp.com/group/softwaresupport/search-result/-/facetsearch/document/KM961884?lang=en&cc=us&hpappid=202392_OSP_PRO_HPE

 

A few of the SM guys have been talking over this one today.  We all agreed we need some more detail,  so please do give us a use case, data used, unloads of dbdict, form and extaccess changes and tracing would make sense too.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Array of structure not being generated correctly.

Hello,

First of all thank you for all the responses, they have been helpful. 

The values in my array of structure work fine now. The problem was that in the web service tailoring, the names that were given for those 2 fields coincided with the names of other fields. At first i didn't think would be a problem seeing as how the fields were inside CPE, but it would seem that is not the case.

The main issue here is that Service Manager doesn't signal this fact leading to this weird situation.

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Array of structure not being generated correctly.

OK thanks for the feedback, could you raise a support call for an enhancement request (ER) to improve the message feedback on web service errors?  This will help even if there is an existing ER as we log all customer requests and this has an impact on product management desicions.  The more customer requests the hight priority the ER will be.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.