Thursday 18 June 2020

Cancel a Work Order If Actual material Exists | Maximo

Question:
Can we cancel a workorder if there is material in Actuals?

Answer:
The product design team have confirmed that a user is able to cancel a Work Order as long as the Material has a zero cost associated to it.

To check the Cost, Goto > Select Action > View > Cost.

Sunday 14 June 2020

List of Items as Parameters of a Function, Map() | Python

Map isn't pythonic, use list instead. 

map(func, iterable)

func : It is a function to which map passes each element of given iterable.
iter : It is a list which is to be mapped( list of parameters to be passed to func).

lets say:
>>> func add(a):
>>>     return a+5;
>>> print add(2)    // 2 as parameter, it will return 2+5=77

//lets give a list of parameters instead of only 1 param

>>> myList = (2,6,7,1)

//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)
[610115]