Content model including a list of dates - contentful

I want to create a content model containing a list of dates of variable length. The only way I figured out how to do it is to create a new nested content model with one date field, and then include these single date entries as a reference list. The issue with this approach is that the date is not showing as the entry title. Instead, a list of dates is only displayed as a list of blocks all labeled "Untitled", which is very unintuitive, as shown in the following screenshot.
Screenshot of the current status
So the questions are: Is there a good way to display the date as Entry title, or is there another solution to include a list of dates into the content model?
I am investigating the use of UI Extensions to solve this, but maybe there is a simpler build-in solution to the problem, than a custom developed extension.

You can't specify the Entry title from date fields, but rather only from short or long text fields, so a UI extension would be the way to go. Add a short text field called title (and specify that this field represents the entry title) then create a UI extension which will put a string of the selected date from the date field into the title field. Check out https://github.com/contentful/extensions/tree/master/samples/slug for a good starting point.

Related

Contentful: Auto-generate title from fields

Contentful requires internal titles for each content entry to be determined in the related Content Type. This is for organizing content entries and making it easier to find them. These internal titles currently have to be filled out manually be the editors.
I am wondering if it is possible to auto-generate a title based on fields that have been filled out.
E.g. in the example I’ve added the editor would add a event location (“Eiffel tower”) and a date (“2021-10-25”) and the title would automatically genreate itself based on those two entries.

Sharepoint Date and difference

In my list i have created calculated field to get the difference between the last modified date and today's date.
I use the formula
=datedif([modified],[today],"d")
It is throwing an error : The formula contains reference(s) to field(s).
Please advise.
I do not have a separate column to hold today's date.
Regretfully, you cannot use [Today] for calculated fields. Calculated fields only update when an item is modified, so the Today Trick of creating a column named Today, setting your calculated field, then deleting that column, is a bad move.
You have a couple options, the best of which is probably to use JavaScript within a Content Editor Web Part on the page to do the calculation for you. You could also try using SharePoint designer and custom XPath and xslt to get "days since modified" to appear on your page.
Generally, if you want something to identify items that haven't been modified in a while, it should be done with filter library views: they can use [Today], and they don't require tricks or workarounds.

Full text search in XPages works on text fields, fails on date and number fields

I have an xpage inside an indexed Lotus Notes database. There is a view control on the xpage (its data source being a Notes view), and since I plan to add a search text field to the xpage, I have been testing the view control "search" property (data\data\search). The documents on the database have text, date and numeric fields. When I look for something located on one of the text fields (e.g., koala), it works, but when I look for a date or a number no documents are found.
I wonder if this could be a localization problem, since in Spain we write the dates with format dd/mm/yyyy and the decimal character in numbers is the comma, but I also tried searching with format mm/dd/yyyy and using the point for decimals, and still no results are retrieved.
I also tried changing the searchFuzzy property on the view control, but nothing changed.
Thanks a lot,
Carlos
Can you post the search syntax you're using? It's hard to diagnose the exact cause. Dates and times definitely work in full text searches.
I'm sorry in advance if you've already excluded any of these. The page in the Notes Help entitled "How can I refine a search query using operators" defines the correct syntax for full text searching, that will allow you to confirm you've got the right syntax.
Also, try doing the same search in the search bar of a view in Notes client. That will help diagnose if it's a problem with search criteria or XPages. (I've used searches in a variety of databases and I'm not aware of any specific problems in XPages.)
Also, have the field data types changed or do you use the same field name for different data types. Notes holds a separate table of the data type assigned to a field name. Once a document is created that has that field, that's the data type used for full text searching. It's not form specific. So if you have a field MyDate that's text on one form and date on another, you can't search both ways. http://www.intec.co.uk/full-text-search-musings/

Managing dates in Section Headers with Core Data

I have conceptual issue with using core data. My app lists events by title in the main tableview then navigates to a tableview which is unique to the event. Here it's supposed to display in the section headers of the tableview an event date, a list of dates that expand a range (requires calculation) or list of unique dates.
I have arranged this in the model with 3 entities. Event & Date have a one to one relationship. Date to Menu have a one to many relationship. Menu contains the data for events that have unique dates, Dates contains events that either have a start date or in some cases when it's a range an end date.
Ok if the above is clear my question is how do I do create a list of section headers unique to an event? Bear in mind that NSFetchedResultsController only provides the ability to return a section name from a managedObject. I think this is what's throwing me.
Do I fetch the data unique to the event then use FRC to create arrays to populate the section headers and live with the table not being managed? Or is there a smarter way?
I don't really understand your model but I think it looks something like this:
Event{
name:string
date<-->Date.event
}
Date{
event<-->Event.date
menus<-->>Menu.date
}
Menu{
date<<-->Date.menus
}
If this isn't correct, you might try editing the question with the data model in this format it can be better understood. (if you can't edit, just fold the format into a comment and I will add it. Alternatively, send it me in an email.)
I'm not clear on what data you want in your Event table section titles. Sections are intended to be groupings of managed objects based on some attribute of those objects. The canonical example would be Contact.app's contact list. The contacts are grouped based on alphabetical value of the first letter of the last name.
Once common mistake is to think of a section table as representing hierarchal objects with the section titles representing superior objects and the rows representing inferior e.g. yo have a model to simulate a file system so you have a Directory entity and a File entity. You try to set the section titles to the name of the Directory and the rows to the names of the related File entities. That would not work smoothly and would not really mesh with the interface grammar that the user has learned for section titles. Instead, you should have a hierarchy of tableviews with a table showing all Directory objects and then a second table view showing all the File objects related to the selected `Directory object.
So, if the section titles you want come from any object besides Event you are probably approaching the problem from the wrong angle.

Sharepoint: Person column in custom list

I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.

Resources