Highlighted
Absent Member.
Absent Member.
1290 views

Using structured arrays on forms and in printing

Jump to solution
I have looked through the HP Knowledge base and these forums to get Structured Arrays to work. I thought maybe others have needed to do something like this and have some tips or hints...

I have a structured array in the cm3r table. The structure contains multiple text fields. I am using SC v6.2 and Oracle 9iR2 DB. The array is in a new table in the database.

I have been trying to create something on the form to allow viewing, editing and adding to the structured array. I have attempted the response in Document ID: 104514 but did not get the desired affect (this document is related to printing and not editing). When tested, text added in the 'text fields' are saved in the structure array but using 'text fields' doesn't allow adding and removing items from the array.

I then tried using a table with columns. The input of each column was set to the name of field in the structured array. When I tested this I can enter multiple rows of data in the table but when clicking Save \ OK, they are not saved in the database. Checking the database confirms the data never made it there. I see no errors reported (including no validate format errors)

Next I'll need to print the structured array and expect to use Document ID: 104514 but I'll need to get the first hurdle to get the data in there to start with!

Any suggestions or references would be greatly appreciated.

cheers,
David
0 Likes
1 Solution

Accepted Solutions
Highlighted
Admiral Admiral
Admiral
Hi David, Mark's screenshot refers to contacts.g, Misc tab, and the contacts dbdict. You should be able to use contacts with only change mgt licenses.

One suble thing with tables and structures: you need to set the column's Input property to the structure name, then the Field property is the field name within the structure.

I've seen issues with structures and Oracle before, but still you should check out the form setup above first. Out-of-box, structured arrays map out to BLOBs. You wrote "the array is in a new table in the database", did you use a subtable setup? That may be a better technical solution especially for Oracle, it will create a separate table for the structure.

Hope that helps!
Malcolm

View solution in original post

6 Replies
Highlighted
Absent Member.
Absent Member.
Hi David,

since SC3 it was always a pain to use structures, that's why avoided it as long as I could. In most cases I created a separate table and a virtual join on the form (just like related records tab). Then I added a button to add records (similar to add/edit contact function). Record editing can be done similar to related records tab.

In your case first I would test if your solution works in a system that runs on P4. If it does, then I would check if you have a mapping issue (the SQL mapping definition for Oracle in dbdict).

Can you test this on a P4 OOB system?

Greets,

Lars
0 Likes
Highlighted
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class
Hi David,

Sturctured arrays work great on the format, but are difficult to export or print. There's a good example in the out-o-box system (6.x). I've attached a screenshot.

hope this helps...
-Mark
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Lars, Mark,

I should be able to try it on P4. We only have a single Service Centre environment at the moment, so I'd either convert it back or blow it away and start again. I'll have a look at the example Mark is suggesting first and if that fails, then try it on P4.

Our current licences only allow us to use the Change module, so that makes it hard to look at other modules for examples. Looking at the change module, it looks like it has no out-o-box examples of arrayed structures 😞 It seems most examples for Service Centre use the other modules.

Mark - could you tell me the name of the form in the screenshot you posted? I should still be able to view it in format designer as an example without the corresponding module licence?

Thanks for your responses,
David
0 Likes
Highlighted
Admiral Admiral
Admiral
Hi David, Mark's screenshot refers to contacts.g, Misc tab, and the contacts dbdict. You should be able to use contacts with only change mgt licenses.

One suble thing with tables and structures: you need to set the column's Input property to the structure name, then the Field property is the field name within the structure.

I've seen issues with structures and Oracle before, but still you should check out the form setup above first. Out-of-box, structured arrays map out to BLOBs. You wrote "the array is in a new table in the database", did you use a subtable setup? That may be a better technical solution especially for Oracle, it will create a separate table for the structure.

Hope that helps!
Malcolm

View solution in original post

Highlighted
Absent Member.
Absent Member.
Hi All,

To further explain "the array is in a new table in the database". The Service Centre database was converted to Oracle first. When adding a new field and setting it to "Structure", there is a checkbox for "Separate table" and a couple textboxes to enter "Unique table" and "Attribute table".

It seems in V6.2 out-of-box, the contacts.g, Misc tab no longer has the communications table shown in the screen shot. It also seems that contacts dbdict no longer has a structured array. But...

I tried setting the column's Input property to the structure name and the Field to the field name within the structure. It now allows the data to be added and edited! Deleting all the cells in a row doesn't delete a row but just sets that row to blank. Maybe someone has some ideas here?

Also, a side question - has anyone come across selecting a row in the table and then populating other text boxes on the same form based on the row selected? Bit like a full editor for a row in a table. If that isn't possible, I image it could open a new form to allow full editing of a row - i think that is what Lars was referring to in 'added a button...'?

(FYI- I'm not planning to have all the parts of the structure in the table as that would become too wide and possibly not very user friendly and hence, a means other than directly editting in the table is needed)

I tried the printing the arrayed structure according to Document ID: 104514 and that worked as desired.

Thanks every for their help once again! Time to move onto the next challenges of using Service Centre...

cheers,
David
0 Likes
Highlighted
Absent Member.
Absent Member.

I have an urgent requirement in SM 9.3. My client wants a table to be displayed on the change planning form.

 

Impact Assessment Table
Group Name  Assessment Comments   Assessment Completed By      Date Assessment Completed
 
These four fields should be in a form of table such that in each filed we can add multiple rows.
 
I have created an array of structured fields in dbdict cm3r as shown below:
 
impact.assessment1    array 
 impact.assessment   structure 
  group.name1        character  
  assessment.comments1 character
  assessment.completed.by1 character
  date.assessment.completed date/time  
 
I created a table and rows in the form design.
 
In all the four fields
Group Name  Assessment Comments   Assessment Completed By      Date Assessment Completed
 
I have used the properties in the form designer as 
group.name1
assessment.comments1
assessment.completed.by1
date.assessment.completed1
 
 
But while entering the values in the table in a form. It still doesnt save any value and is still blank. Please let me know how shall I add values in a table of the form so that it should not erase the values while submitting.
 
Regards,
R.Singh
 
 
 
 
 
 
 
 
 
 
 
 
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.