UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.. Absent Member..
Absent Member..
531 views

New form in CI details

Hi experts!


During searching CI m in CI details form i want to implement a subform that will refer to the newly created table in database.
In this form user should have opportunity to add   information to the table entries directly by using  some button, for example:
 i should be able to Select from the droplist ipV4 (ipV6, FQDN etc), and then in the next field  enter a value and this info should be saved for future search of this CI.
Can this somehow be implemented?

 

Thanks in advance.

0 Likes
8 Replies
Absent Member.
Absent Member.

Virtually everything is achievable in sm.

If got the requirement correctly you want to display the value list in some drop down file on Ci search by reading the data from customized table. And this customized table can have value posted by user during the search with help of some button.

You can easily save the value in some using click of button but loading in to drop down will either have the value from customzed table or hardcoded value like from Global list.

Problem can be divided in two major parts,

  • Posting the data to customized table,
  1. Simple create a button (display option) CI search screen
  2. and write a javascript in pre-javascript tab to save data like,

var cfile =  new SCFile("custom_table_name")

cfile.column_in_custome_table = $field_on_form;

cfile.active = true

rc = cfile.doAction("add");

 

  • To fetch the data from the table in drop down,

Open the CI search form in format designer mode and select the drop down field. Here in property window go to value list condition and put like,

select("column.in.custome.table ", " custom_table_name ", "active", "true")

 

 

Above will not handle duplicate values but try above if understood your need correctly.

____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. Absent Member..
Absent Member..

Hi, Piku!

 

I'll try again to explain more precisely the task.

 

When we go to the tab CI Details, we have tab Comments, in which we can add some comments with help of button "Add comment". After that comment saves in db, and in future searching of this CI we can see them. Pictures in attachement.

 

So I need to add the same table in tab CI details, and i want to add to this table another information. I've created table for it the same as Comment, and added the button. But i can not even see an information from new table, it is just empty, although the information in the table is present, i've added it manually.

 

Thanks in advance!

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

 
0 Likes
Absent Member.
Absent Member.

It seems to be totally customized system and just using form and table will not enable the capture of comments data.

There will be code behind the button which is getting called to same the data.

 

As of now new comment data is available in actual dbdict but not visible in form. Then it should be issue of the link, as same is used to display data using VJ. Use the existing logic to show the data for newly customized table.

Ensure to change the query and field in link line for same. Also crosscheck the table/subform property in fd as it will contain the field to be mapped with above mentioned link line.

 

 

Also this query looks totally different to that of shared opening statement.

____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. Absent Member..
Absent Member..

Now i can see information from database on my subform. 

The problem is - i can't add any information to database using button. Even if I want to add some default values like "test".

I've tried to use your Javascript above  and to call Rad application.

Maybe someone has examples of scripts or rad expressions which can help me to add information to db?

 

Thanks in advance! 

 

0 Likes
Absent Member.
Absent Member.

May you post the exact script and flow you are using to achieve it.

____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. Absent Member..
Absent Member..

Hi,

i've added links for databases and aliases to fields i need. After that my subform displays info from db.

 

To add information by Button i've created display option:

Pre Rad expression

cleanup($IDcom)
$L.void=rtecall("rinit", $L.rc, $com, "ASTLaddressesPlanned")
$L.void2=rtecall("getnumber", $L.rc, $IDcom, "ASTLaddressesPlanned")
Type in $com=$L.type
Address in $com=$L.address
Purpose in $com=$L.purpose
id in $com=id in $L.file
Key in $com=$IDcom
$L.result=rtecall("radd", $L.rc, $com)
$L.void=rtecall("log", $L.r1code, "am.display.joinfile_addaddress_planned DO: "+$L.result)

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

i have a question,

how can i delete information from db by choosing some line in subformat and after click Delete button it should be deleted?

Maybe someone has some examples?

Thanks in advance

 

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.