Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
8 subscribers
Views
4541 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Can anyone let me know, how do we get the Last Updated time of a particular CONS
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
Can anyone let me know, how do we get the Last Updated time of a particular CONSTANT ??
OriginalPostID-190022
OriginalPostID-190022
Discussion posts and replies are publicly visible
0
sonalk
over 9 years ago
Hi Enoshe,
In designer under rules tab, search for the constant and click on the Version number. There you will get to know the modified date time for that particular constant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
Sonalk, I forgot to mention that, I need it to retrieve and display it in a Tempo form!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 9 years ago
How is the constant getting updated ?
You could use the Update Constant smart service and configure the now() function into a date time process variable and can use the same to show on the tempo form.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
My Use Case is to display the initial value of a constant in a text field with the Last Updated Time. If the User updates the value, then I'll update the constant with the Update Constant smart service. So, how do I retrieve the last updated/modified time of a constant??
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 9 years ago
You can show the now function in a text field in the tempo form itself and display the text field only if the constant is modified.
Assuming that the updated constant is being stored in a rule input, you could use the code below :
if(
rule!APN_isEmpty(ri!updatedValue_text),
{},
a!textField(
label: "Updated time",
labelPosition: "ABOVE",
value: now(),
readonly: true(),
refreshAfter: "UNFOCUS",
validations: {}
)
)
Hope it helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
This is my use case. When I log in, I want to find the Constant's last modified time(need to display), and then clicking on Update, all fields will become editable, update the constant and submit with the new updated time.
So how do I fetch the constant's last modified time??
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Rahul Gundu
over 9 years ago
Hi,
I don't think there is a function/Custom plug-in which will get the constant last modified date&time.
1st approach, Create a custom function which will get the last updated date time of constant.
2nd approach, Use one more constant which stores date time. In your process model, update the date time constant value in parallel with the actual constant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harshav
over 9 years ago
Not sure if this would help you, but just as an Idea!!!, When you first have to create a constant, it is not updated, the value is initiated to some X at that time you can show the last updated time as N/A .From the next time the value is updated where you can show the user that Last UT by capturing the Now in each update constant in some other constant or In DB.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
Thanks Rahul and Harsha.....1st approach is the one which I'm trying to do right now.....! I cant save the value in DB because, since this is for the system admin, there are chances that the sysadmin can login and update the constant in Designer mode.....then there is a loop hole in the latest updated time!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel