How do I auto-generate a catalog number?

More
7 years 8 months ago #63156 by dan40
Hi, I need to know how to generate a read-only sequential catalog number in a field when the item I'm creating is saved. Could someone please direct me to the documentation or provide some advice on how I can do this?

Thanks!

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

More
7 years 8 months ago #63168 by ggppdk
Hello

this would be rather simple to implement as field,
and usuable in several sites,

i think this should be composite field ??? :

- a select drop down to select a "prefix" or "catalog type"
- the automatically adding the ID of the item


-- 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...

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

More
7 years 8 months ago #63197 by dan40
Sorry, I don't understand. I tried putting "ID" into the Values Creation/Default field but that didn't work and only rendered my view with an "Error 500" screen, so I removed it and it went back to normal. I think I need a little more direction with this if you're free. Do you have a step-by-step procedure I can follow rather than just suggesting how it might be done? I know I'm new, but I can't see what you mean with the procedure you've suggested.

Thank you.

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

More
7 years 8 months ago #63251 by micker
you can use {item->id} in prefix or suffix of every field
that load item id (unique number)

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]
The following user(s) said Thank You: dan40

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

More
7 years 8 months ago #63252 by dan40
Thanks micker! OK! Now we're getting somewhere.

When I created a new field, I called it "Catalog #" and assigned it to "Article" type. In the Editing and the Viewing tabs, In the "Every Value Prefix", I entered "CAT-" and in the "Every Value Suffix", I added as per your reply, {item->id}. Then I went to my Template, and added Catalog # to the Basic and Column Listings pages for Blog template, and clicked and dragged the "Catalog #" box over to where I wanted it to display, and saved.

Now when I view my articles, it shows me "Catalog #: CAT-{item->id}{item->id}" instead of the ID number. Am I doing something wrong?

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

More
7 years 8 months ago #63253 by micker
can you try {{item->id}} ?

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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.294 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