<!DOCTYPE html>
<html>
<script src="js/jScript.js"></script>
<script src="js/widgetsdk.js"></script>
<link rel=
'stylesheet' href=
'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&
amp;
display=swap'><link rel=
"stylesheet" href=
"./style.css"> <script>
function loggedInUser(){
ZOHO.CREATOR.init()
.then(function(data) {
//Code goes here
var initparams = ZOHO.CREATOR.UTIL.getInitParams();
document.getElementById("loggedInUser").value = initparams['loginUser'];
alert(initparams);
});
}
function checkuserExists(){
userEmail = document.getElementById("loggedInUser").value;
userEmpCode = document.getElementById("empCode").value;
config = {
appName:"test",
reportName:"Logged_IN_User_Report",
criteria : "(Email == \""+userEmail+"\" && Employee_Code = \""+userEmpCode+"\")",
}
ZOHO.CREATOR.API.getAllRecords(config).then(function(response){
var recordArr = response.data;
alert(recordArr);
});
}
</script>
<head>
<meta charset="UTF-8">
</head>
<body onload=loggedInUser()>
<div class="screen-1">
<img src="./images/gardeniaLogo.png">
<div class="email">
<label for="email">Logged In User</label>
<div class="sec-2">
<input type=
"email" name=
"email" id=
"loggedInUser" placeholder=
"Username@gmail.com" disabled/> </div>
</div>
<div class="empCode">
<label for="empCode">Employee Code</label>
<div class="sec-2">
<input type="text" name="empCode" id="empCode" placeholder="GC1001"/>
</div>
</div>
<button class="login" onclick=checkuserExists()>Login </button>
</div>
</body>
</html>