New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.. Absent Member..
Absent Member..
1072 views

display search items in a particular view - using customized button issue

i have created a new button and when i click on that new button i'm getting the results correctly. But if i select a particuler view and then search i'm not getting the result. i have a java script which i call when i click on that button. also the action in that button is do nothing. in the rad i'm using se.search.engine and passing the query which is retriving the data correctly. now i want to know why if i select a view and search using my button its not displaying the results in that view? Please help Regards, Kut

Sreek
0 Likes
16 Replies
Highlighted
Absent Member.
Absent Member.

Hi,

Which view you are talking about?
"if i select a particular view and then search" - what does that mean.

It might be possible because of correct parameter not initializing for view screen but for you working form it is fine.


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

I have created a view. its working fine with normal search. search results are comming in that view.

 

Now I have created a new button and i'm calling se.search.engine rad application in that. Now if i select my view and click on my new button the results are populating but not in the view which i'm selecting. Its populated under the default view.

 

How to get the results in the view which i'm selecting when i use the new button, which uses se.search.engine as rad application?

 

 

Sreek
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi,

What is view for you?

For SM prospects view has defined query on any table and allows you to search without entering search criteria and it will displays the list of record as list.
Now how can you select view and click button simultaneously?

On view there is no such possibility and not make sense.

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

Is there anything that I can add in the pre or post rad to get my result in a view which I’m selecting in the search screen?

 

How to do that?

 

Else is it possible to pass the same query to the search button instead of having a new button in place?

 

attaching screen shot for better understanding

 

please help

Sreek
0 Likes
Highlighted
Absent Member.
Absent Member.

Ok.
Background,
The view you select has the define query in table 'inbox' inside field 'short.query'. When you select a view and also put some value in search form then SM will append both searches with 'and'.

May try,
So here in your JS you have to query the 'inbox' table for view name selected, here pull out the query and append it your resultant query from current JS using 'and'.
Here you should use the rad syntax to append (after getting existing query from JS) the query, as in ‘inbox’ query is in RAD syntax.

But ensure to add alog to search for current table only as two views may exists in system for different table.

Else you want to add it to existing search button. – yes it is also possible.
You have to modify cc.search process for the variable ‘$L.append..sql’ , it would be little complicated but a clean way. Feels same I have posted to one of your thread recently.

Hope it is clear.

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

Can you give more details on this to do this customization in the existing search button itself.

 

My requirement is like this.

 

i need to get 4 or more records which i am searching using the name of the CI's in the device table using the search screen and a particular view.

 

What ever i tried till now is not giving me a solution.

 

I tried with separate button and in that calling se.search.engine etc. its working but results not displaying in the selected view.

 

 

 

Now my question is

 

how to append the java script formated result to other criterias which i selected in the search screen and exicute search?

 

 

Sreek
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi,

You mentioned you are searching CI !!
Afraid to say but device works in totally different way, it call base method for search and you cannot tailor that underlying process is not accessible. It comes by RAD directly.
Here it becomes more complicated because it use the joinfile.

For me it is not possible to append query I would have to check all value passed in search format and the build query for se.search.engine, but might some else has solution.


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

Now i'm trying in java script itself and i'll call this java script in search button

 

But its not displaying the results

 

can you check my script and advice? attached the script.

 

Sreek
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi,

Since it is calling base method hence it will take any variable from your side.

Or you are calling se.search.engine in customized display option, if so,
you have expression 'system.vars.$L_file.servername=formattedstring;
'
but when it will call JS (from sl) then $L.file will be null or something so it should be there.
are you getting data in print statements?
also as said above you are able to get the result then what is the issue now?

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

I'm getting the result by using the customized display option button and the script.

 

But the results are not displaying in the desired view.

 

Not sure how to resolve this issue.

 

Using se.search.engine i can pass a query and get the results in the default view only.

 

but in the normal search we can select a view and disply the results in that particular view which i'm not able to get when i use se.search.engine.

 

Is there any parameter which i can pass in the se.search.engine to tell the rad function that i need my results in a particular view?

 

we are passing name=device and query="my query"

 

like that

view=my view???

 

 

I have one more query

 

 

cm3r=newSCFile("device");
 query="ci.name isin "+ "ABC";

  rc=cm3r.doSelect(query);

 

what this doSelect(query) will do? will this display the results if it finds the ABC record in device table?

 

or do i need to write something else to display the results? if yes how can i tell sm that i need my results in a particular view "xyz" from inbox table?

 

KUT

 

 

Sreek
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi,

View means the columns displayed or set for that view ?
It might not possible as columns will always be as per set by use while using search.engine.

Try to call RAD ‘us.request.inbox’ with below parameters,

class.device | device
boolean1 | inboxname


Did not tried but might work

Hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
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.