Friday, May 17, 2013

How to use AJAX using Angular JS in Lotus notes

Hi All,

I have implemented the AJAX using Angular Js in Lotus notes. Here to go,

Scenario and Solution: 
   
    * I want to connect the backend view, and get the data in to JSON structure, Here i have used Angular JS, it is very simple.

 * Refer the below function, this was the strucuture of the code for calling AJAX in Angular Js, and
     i am passing the URL,
      and get the JSON,
      and customized the JSON ,
       and sending to Angular Scope variable,
      Using Scope variable i am easily fetching the details from front-end :)


function LoadJSONVal($scope,$http, $templateCache, $filter)
{
$scope.method = "GET"
$scope.url = "vwAppdetails?ReadViewEntries&outputformat=JSON&count=10000"
$http({method: $scope.method, url: $scope.url, cache: $templateCache}).
    success(function(data, status) {
                      $scope.status = status;
                      var AllVal = new Array();
   
                     for(var i=0; i<data.viewentry.length; i++)
                      {
                     AllVal[i] = {"AppName" : data.viewentry[i].entrydata[0].text[0], 
                                                    "Server" : data.viewentry[i].entrydata[1].text[0]
                                                    ,"Filepath" :data.viewentry[i].entrydata[2].text[0],
                                                      "Sponsor" : data.viewentry[i].entrydata[3].text[0],
                                                      "Suppteam" : data.viewentry[i].entrydata[4].text[0],
                       "UNID" : data.viewentry[i].entrydata[5].text[0],
                                                       "WebURL" : data.viewentry[i].entrydata[6].text[0]}           
     
        $scope.Value1.AppName=AllVal;

}

Wednesday, May 15, 2013

How to bind the HTML using Angular JS?

Hi All,

I have implemented couple of things in Angular Js in Lotus notes. I would like to share the same with you all.

Scenario : 
       How to open the the multiple document(using UNID) in to frontend using Angular JS

Code :
       *  This is my HTML, in this there is a directives called "ng-click", this will call the function "Iframe Model" and passing the UNID,and status of the document like EDITDOC or OPENDOc or OPENFORM

     <a  data-toggle="modal" ng-click='IframeModel(Value1.UNID,"EDITDOCUMENT")'><Computed Value></a>

      *  That function i have written in angular JS, Here,based on the parameter it is choosing the IFRAM, and  store the same in to the $Scope.

     scope.IframeModel = function(srcURL,status){
if (status=="EDITDOCUMENT")
{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="0/'+ srcURL +"?"+status+'"></iframe>';
}
else if(status=="OPENFORM"){
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="'+ srcURL +"?"+status+'"></iframe>';
}
else{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="300" src="'+ srcURL +"?"+status+'"></iframe>';
}

}

    This is the another directives which helps to bind the HTML from JS, In the above function we are storing in to the scope variable and binding the same in to the another directives called "ng-bind-html-unsafe". This bind directives open the URL at fontend
     <div ng-bind-html-unsafe="renderIframe"></div>

Monday, May 6, 2013

Notes Documents are disappearing from Lotus notes view

Hi All,

Issue : There was an issue, documents are missing in the view, but readers field was fine, so we are not sure why documents are disappearing from the view

Solution : Later on , i realized if document type is response, those response document view based on the main documents, suppose main documents has deleted the response document will not show, so i just turn off the  "Show response documents in a hierarchy" in view properties ,and i am able to easily find the missed out documents from that flat view

Wednesday, May 1, 2013

Do you know how to get the JSON and XML from Lotus notes view?

Here you go,

We have a way to get the JSON and XML format from Lotus notes view?

"https://servername/Db filepath/viewname?readviewentries&OutputFormat=JSON"
"https://servername/Db filepath/viewname?readviewentries&OutputFormat=XML"

After converting the JSON format , how to get the Key-Pair values from JSON?

Javascript : 

you have to use AJAX, and try the below code, you will get the details from the notes view


for(var i=0; i<data.viewentry.length; i++)
      {
     
           data.viewentry[i].entrydata[0].text[0]          
     


Web Tool for searching keywords in all the Lotus notes database

Hi All,

This is my another tool. The purpose of this tool is searching the keywords from multiple lotus notes databases.This tool is based on web application. I have used JQuery, Lotusscript, AJAX, JSON.

1. In this tool, we have to manually create a document with details like databasename,Server, filepath, 8 fields name.

2. We have to select the database name which is present in the drop-down  and using JSON, we will get the corresponding details like, server, and filepath etc,

3. We have to enter the search keyword in to the field, and while clicking the search button, system fetch the parameters like server , filepath , 8 field name etc and pass those parameters in to backend agent, then the agent will start to search it in the corresponding database, and retrieve the result in JSON format

4. Using AJAX. i fetch those JSON format result and show in to the front-end.

5. We have an option called "Export in to excel", it will help to export the search results

-END-

Implemented Schedule Agent Monitoring Tool in Lotus notes application

Hi All,

After detailed analysis, i have created a tool called "Schedule agent monitoring tool in Lotus notes". I will explain to everyone, how this tool is working.

1. In this tool, First, we have to manually create a server and database details, while save the document, there is an API (refer code :http://maheshwaranthiru.blogspot.com/2013/04/lotus-notes-c-apis-for-fetching-agent.html) that will run, and start to fetch all the scheduled agent details in to this tool, and create a new doucment with Last ran of agent.

2. Progress bar will help us to confirm whether APIs is still fetching the agent details or not. (Note : Dont Press CTRL+Break when API is running- otherwise lotus notes client crash.). This is the only problem in this tool. I am planning to overcome this issues in version 2.

3. There is an scheduled agent present in this tool, it will process all the documents, and checking last ran details and compared with corresponding minutes. If the comparison is more than 0, it will not send an email to the team otherwise it will send an email to team with the agent details, Team will taken the relevant steps.

- END-