I have an attribute in my asset management laptops object named "Current Date". I want to assign it todays date by default. Then I have attribute Current Status (Months) Where I want to calculate number of months by taking difference of attributes current date - purchase date.
please tell me how can i do thos
Hi and welcome to the community!
Can you elaborate on the use case because storing a current date on a laptop, whuy would you do that? You would have to update all laptops every day?
Please explain what you are trying to achieve.
Hey so we have date of purchase which will be manually set by us. Then we want to have current date which should by default change everyday.
This is because we want to calculate the End of life of devices (in months) which will be current date - date of purchase.
FYI-I want these attributes to be in only assets and not use anywhere in the issues/fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would the out of the box created date on the asset align with what you're looking for in Current Date?
I think I tried something similar, in our situation we have an "Assigned Date" field when we assign a computer to an employee and then we wrote a global rule to calculate the difference between "Assigned Date" and Current Date each day and wrote the result to an "Asset Age" field to help determine if the asset was eligible for an upgrade. The main obstacle we ran into was that global automations on assets seems to have a limit on the number of objects it can run on that's very small, it will only update like 50 assets or less each run so when asset counts reach into the thousands this is not a scalable solution.
What I've learned after is that onboarding assets works best when tied to a issue/request workflow in JSM with default and required fields and then have an automation create and link the asset, or import from another source like an MDM or discovery tool. To report on things like contract date or upgrade eligibility I rely on AQL searches or exporting to sheets/excel to get that data.
Apologies if I'm misunderstanding your situation though, please correct me if I'm wrong
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey i guess you have understood it fine but I do not want to use these attributes anywhere in fields/issues.
I just want them to be associated to assets. Is there anyway for that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think just having a purchase date field you can accomplish the rest using AQL to query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and where can I write the AQL query for asset attributes? if you can please guide on the steps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.