How to show my update message in the field that shows with editing date, time and editor name?
How to show my update message in the field that shows with editing date, time and editor name?
I set the data type to long text
Default to <%%editingDateTime%%><%%editorUsername%%>
the field is shown nothing but just the message I type.
I need to type my message into the field that shows my message together with editing date & time, & editor name for each message, so my company can following in future. the attachment also was shown my setting, what is wrong?
Default to <%%editingDateTime%%><%%editorUsername%%>
the field is shown nothing but just the message I type.
I need to type my message into the field that shows my message together with editing date & time, & editor name for each message, so my company can following in future. the attachment also was shown my setting, what is wrong?
- Attachments
-
- editor name date time.jpg (128.8 KiB) Viewed 11157 times
Re: How to show my update message in the field that shows with editing date, time and editor name?
I think you should first set update_Info field to read only so it takes its value automatically when any record is updated, and then you should separate your message in a different field.
Re: How to show my update message in the field that shows with editing date, time and editor name?
I need to show: Example
The message is "Price is 7.8 Million" show editing date, time and editor name beside this message.
How?
I had set it to read-only field but it just showed the date or time without my message that is no use for me, how can it showed both for each of my update.
The message is "Price is 7.8 Million" show editing date, time and editor name beside this message.
How?
I had set it to read-only field but it just showed the date or time without my message that is no use for me, how can it showed both for each of my update.
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hello Sai chi,
i think you can insert your automatic values in one of hooks function like before insert
i think you can insert your automatic values in one of hooks function like before insert
Re: How to show my update message in the field that shows with editing date, time and editor name?
what kinds of Automatic value? like
$data['total'] = $data['quantity'] * $data['unit_price'];
any example codes that can show the edit time and editor name for each of update?
$data['total'] = $data['quantity'] * $data['unit_price'];
any example codes that can show the edit time and editor name for each of update?
Re: How to show my update message in the field that shows with editing date, time and editor name?
for each update or insert , you can inject this code where you have your insert query
you can get the date or time of the edit time using php date() function and it get time also
to get information of the editor (user who edited) you can use $memberInfo which is an argument of after update function
and to get the user name use
$memberInfo['username']
also you can get all getMemberInfo() fields in
http://bigprof.com/appgini/help/advance ... Info-array
now you have all your data ready to be inserted (date or time , user who updated)
so now you need to append them to your message
if you will insert $message append the rest if parameters to it (date or time , user who updated)
$message.=$time.$user
i hope that helps you
you can get the date or time of the edit time using php date() function and it get time also
to get information of the editor (user who edited) you can use $memberInfo which is an argument of after update function
and to get the user name use
$memberInfo['username']
also you can get all getMemberInfo() fields in
http://bigprof.com/appgini/help/advance ... Info-array
now you have all your data ready to be inserted (date or time , user who updated)
so now you need to append them to your message
if you will insert $message append the rest if parameters to it (date or time , user who updated)
$message.=$time.$user
i hope that helps you
Re: How to show my update message in the field that shows with editing date, time and editor name?
My Code is the following
function Property_after_update($data, $memberInfo, &$args){
getMemberInfo()
$data['UpdateInfor']=$message.
$message.=$time.$user
return TRUE;
or I tried this
getMemberInfo()
$data['UpdateInfor']=$time.$user
Both are not working and the whole system is no run, why?
my message field is "UpdateInfor" and all users have to show their (date or time, user who updated) so getMemberInfo() shall be applied
http://bigprof.com/appgini/help/advance ... Info-array
this link doesn't show an example where shall I find an example code?
function Property_after_update($data, $memberInfo, &$args){
getMemberInfo()
$data['UpdateInfor']=$message.
$message.=$time.$user
return TRUE;
or I tried this
getMemberInfo()
$data['UpdateInfor']=$time.$user
Both are not working and the whole system is no run, why?
my message field is "UpdateInfor" and all users have to show their (date or time, user who updated) so getMemberInfo() shall be applied
http://bigprof.com/appgini/help/advance ... Info-array
this link doesn't show an example where shall I find an example code?
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hello Sai chi ,
i think you are in the right way through this example
return TRUE;
but it will need some modifications
$user=$memberInfo['username'] ;
$time=//you can get it through php function
$data['UpdateInfor']=$message;
$message.=$user.$time
now you have the message ready to be update the message field of this table
i mean that you will need to make a sql query to update the message field using the $message
something like
update Property set messagefield=$message where id=$data['selectedID']
i hope it would help you
i think you are in the right way through this example
return TRUE;
but it will need some modifications
$user=$memberInfo['username'] ;
$time=//you can get it through php function
$data['UpdateInfor']=$message;
$message.=$user.$time
now you have the message ready to be update the message field of this table
i mean that you will need to make a sql query to update the message field using the $message
something like
update Property set messagefield=$message where id=$data['selectedID']
i hope it would help you
Re: How to show my update message in the field that shows with editing date, time and editor name?
i want just add little thing to the ubove query messagefield='{$message}' where id='{$data['selectedID']}'
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hi Tamman
Something I am not sure about
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
do you mean the sql query is in the main software, the lookup field (advanced lookup options)? so I need to add messagefield=$message id=$data['selectedID'] ?
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Something I am not sure about
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
do you mean the sql query is in the main software, the lookup field (advanced lookup options)? so I need to add messagefield=$message id=$data['selectedID'] ?
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hi Tamman
Something I am not sure about
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
do you mean the sql query is in the main software, the lookup field (advanced lookup options)? so I need to add messagefield=$message id=$data['selectedID'] ?
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Something I am not sure about
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
do you mean the sql query is in the main software, the lookup field (advanced lookup options)? so I need to add messagefield=$message id=$data['selectedID'] ?
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Re: How to show my update message in the field that shows with editing date, time and editor name?
do you mean the sql query is in the main software, the lookup field (advanced lookup options)? so I need to add messagefield=$message id=$data['selectedID'] ?
- Attachments
-
- sql.jpg (153.67 KiB) Viewed 10843 times
Re: How to show my update message in the field that shows with editing date, time and editor name?
no ,the sql query must be written in after add or after update hook function
Re: How to show my update message in the field that shows with editing date, time and editor name?
no ,the sql query must be written in after add or after update hook function
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hi Tamman
Something I still not get it
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Something I still not get it
getMemberInfo() gets all login users name that can be shown in my field "UpdateInfor" right? if yes: shall I write getMemberInfo ([memberID or membername])?
$time=//you can get it through php function (shall I write "Stime.=toMySQLDate.time12" ? )
did you mean messagefield=$message convent to my codes "UpdateInfor=$message" or $data['UpdateInfor']=$message ?
thanks for your reply and help.
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hi Tamman
I still wait for your reply, can you answer my above question?
Thanks.
I still wait for your reply, can you answer my above question?
Thanks.
Re: How to show my update message in the field that shows with editing date, time and editor name?
Hello sai ,
i read the thread over and over and i feel confused so , could you please tell me what exactly you have in the table and what you want to have ?
i read the thread over and over and i feel confused so , could you please tell me what exactly you have in the table and what you want to have ?