If you want to find first EMPTY column in row, then use this formula into (column I) to find the index of the empty column (see column I).
#N/A means there is no column , like row 3
=MATCH(TRUE,INDEX(A3:G3="",0),0)
If you want to find first EMPTY column in row, then use this formula into (column I) to find the index of the empty column (see column I).
#N/A means there is no column , like row 3
=MATCH(TRUE,INDEX(A3:G3="",0),0)
map(func, iterable)
lets say:
>>> func add(a):
>>> return a+5;
>>> print add(2) // 2 as parameter, it will return 2+5=77
//first lets do the same with for loop.
>>> for i in number:
... print add(i);...
96
// lets do the same with list.
func add(a):
returnn a+5;
myList = (2,6,7,1);
// all items of list will be the parameter for the function add().
>>> print map(add, myList)
[6, 10, 11, 5]
from psdi.server import MXServer
if mbo.getString("ASSETNUM") == '10002':
service.error("cust",MXServer.getMXServer().getProperty("mxe.db.password"))
Original Post: http://vietmaximo.blogspot.com/2020/07/display-password-stored-in-system.html
assetMboSet = mbo.getMboSet("ASSET")
assetMboSet.setFlag(MboConstants.DISCARDABLE, true)
curMbo = mbo.moveFirst()
while
curMbo != None:
curMbo = mbo.moveNext().
import java.util.ArrayList;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import com.ibm.websphere.security.NotImplementedException;
import com.ibm.ws.wssecurity.saml.common.util.UTC;
import com.ibm.wsspi.security.web.saml.AuthnRequestProvider;
.........
public HashMap <String, String> getAuthnRequest(HttpServletRequest req, String errorMsg,
String acsUrl, ArrayList<String> ssoUrls)
throws NotImplementedException {
//create map with following keys
HashMap <String, String> map = new HashMap <String, String>();
String ssoUrl = "https://example.com/saml20/Login";
map.put(AuthnRequestProvider.SSO_URL, ssoUrl);
String relayState = generateRandom();
map.put(AuthnRequestProvider.RELAY_STATE, relayState);
String requestId = generateRandom();
map.put(AuthnRequestProvider.REQUEST_ID, requestId);
//create AuthnRequest
String authnMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+"<samlp:AuthnRequest xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" "
+"ID=\""+requestID+"\" Version=\"2.0\" "
+ "IssueInstant=\"" +UTC.format(new java.util.Date())+ "\" ForceAuthn=\"false\" IsPassive=\"false\""
+ "ProtocolBinding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" "
+ "AssertionConsumerServiceURL=\"" +acs+"\" "
+ "Destination=\"" +destination +"\"> "
+ "<saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">"
+ issuer
+"</saml:Issuer> <samlp:NameIDPolicy"
+"Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:transient\""
+"SPNameQualifier=\"mysp\""
+"AllowCreate=\"true\" /> <samlp:RequestedAuthnContext Comparison=\"exact\"> "
+"<saml:AuthnContextClassRef xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">"
+"urn:oasis:names:tc:SAML:2.0:ac:classes:</samlp:RequestedAuthnContext> </samlp:AuthnRequest>";
map.put(AuthnRequestProvider.AUTHN_REQUEST, authnMessage);
return map;
}
private String generateRandom() {
//implement code that generates a random alpha numeric String that is unique
//each time it is invoked and cannot be easily predicted (like a counter)
}
log = MXLoggerFactory.getLogger("maximo.application.AUTOSCRIPT")
scriptname="<script name>"
log.info("******Entering Autoscript : " +scriptname +"******")
log.debug("[DEBUG] script "+scriptname+" <Message>")
log.info("******Existing Autoscript : " +scriptname +"******")
except Exception, e:
print >> sys.stderr, "[ERROR] script "+scriptname+" failed: ",e.message
print >> sys.stdout, "[ERROR] script "+scriptname+" failed: ",e.message
log.error("[ERROR] script "+scriptname+" failed: " +e.message)
mboSet = mbo.getThisMboSet()
mbo.getMboSet("PR")where PR is the Relation Name already exists in database configuration from this record.
woSet = mbo.getMboSet("woSet ", "WORKORDER", "status = 'APPR' and siteid = 'BEDFORD'")
woSet = MXServer.getMXServer().getMboSet("WORKORDER", userInfo)
server = MXServer.getMXServer()userInfo = mbo.getUserInfo()whereClause = <CONDITION>server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000)
micSrv = MXServer.getMXServer().lookup("MIC")server.lookup("MIC").exportData("MXPO", "LegecyApp", " ponum='"+vPONum+"' and revisionnum="+vREVNUM , micSrv.getNewUserInfo() , 1)
Note:
Mic is old service name for MIF, but still the same name
Label: Refresh PR
Event: reset
Target id: results_showlist
Application Name: Custom_App3. Enlist you custom application in APPDOCTYPE table, for that run this insert statement
Relationship: DOCLINKS
child Object: DOCLINKS
Where Clause: ownertable='Custom_App' and ownerid=:Custom_AppID
INSERT INTO MAXIMO.APPDOCTYPE (APP, DOCTYPE, APPDOCTYPEID) VALUES ('Custom_App', 'Attachments', (NEXT VALUE FOR MAXIMO.APPDOCTYPESEQ));
1. get max(MAXMODULESID) and add 20
select max(MAXMODULESID)+20 from maxmodules ; --42+20
now INSERT in MAXMODULES using the value from step 1.
Insert into MAXMODULES ( MODULE, DESCRIPTION, MAXMODULESID) values ('QMS', 'Quality Management System', 62)
2. get max(MAXMENUID) and add 200
select max(MAXMENUID)+200 from maxmenu; --18779+200
3. get max(POSITION) and add 1000
select max(POSITION)+1000 from maxmenu; --96033+1000
4. now INSERT in MAXMENU using the values from step 2 and 3.
Insert into MAXMENU (MENUTYPE, MODULEAPP, POSITION, SUBPOSITION, ELEMENTTYPE, KEYVALUE, HEADERDESCRIPTION, VISIBLE, IMAGE, MAXMENUID)
values ('MODULE', 'QMS', '97033', 0,'MODULE', 'QMS', 'Quality Management System', 1,'atb_bookmark.gif', 18979)
SELECT w.reportdate
,to_date(to_char(CURRENT timestamp-1,'YYYY-MM-DD')||' 05:00:00','YYYY-MM-DD HH24:MI:SS' ) yesterday
,to_date(to_char(CURRENT timestamp,'YYYY-MM-DD')||' 05:00:00','YYYY-MM-DD HH24:MI:SS' ) today
FROM WORKORDER W
WHERE 1=1
--FETCH FIRST 10 ROWS ONLY
AND W.reportdate BETWEEN to_date(to_char(CURRENT timestamp-1,'YYYY-MM-DD')||' 05:00:00','YYYY-MM-DD HH24:MI:SS' ) AND to_date(to_char(CURRENT timestamp,'YYYY-MM-DD')||' 05:00:00','YYYY-MM-DD HH24:MI:SS' )