retrieve the last item of a list in a field

More
4 years 8 months ago - 4 years 8 months ago #78296 by tataye
Hello

I'm trying to retrieve a last item from a list to incorporate it into a field:
Let me explain:
we're going to do some repairs, each date will be put on top of the other to keep track.
ex
...
...
revised on 01.02.2020 by Xavier
revised on 01.03.2020 by Bernard

and in a second field, I'd like to dynamically pop up:

date of last revision: March 2020

is it possible, if so, how?
Last edit: 4 years 8 months ago by tataye.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #78297 by micker
create a text field
in defaut value juste add a space (empty carac)
in prefixe {{item->modified}} {{item->modified_by}}
=> that display modified date (last revised date) + revised by
put this in your template position
use jce media popup to load your automatic my be you can add automatic class like this
prefix : <div class="automaticpopup">{{item->modified}} {{item->modified_by}}</div> (that a false code) its a proof

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #78298 by tataye
thank you, but it is not the date of the revision of the item (article)
it is a group field that I will assign to a type
(with 2 fields : date and who did)

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #78299 by micker
... its more complexe ...
a solution without coding is to order group field => last is first
and after you can use {{nameoffield##0}}
0 is the first value

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #78305 by ggppdk
Hello

last item of a list ?

do you mean last item of category view ?
do you mean last value of flexicontent multi-select field ?

you can get the last value of a field during item form save and do a lot more
- you will need flexicontent pro plugin , that allows execution of custom code during item form saving and creating field value automatically
- and then the custom PHP code to do the above


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 4 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #78310 by tataye
hello georges and yannick

thanks for answering

here is what i would like to do



so the user will go inside the item he wants to say he has done some repairs or revision (this is technological material for hospital)
and if it is a revision, i would like to retrieve the last date to be input in a field (that will be displaid on some place to remember the technician that revision has been done last this day.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.735 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline