Bolt CMS: Can contenttype title be generated based on other field values? - bolt-cms

I would like to create a contenttype that has select fields for things like 'month of year' and 'type of product' and have the title field be auto generated based on the values of these two fields.
This is because the two select field values are descriptive enough, and I would like to reduce the amount of repetitive typing of the same information the end user of the CMS may have to do to make a title show up in the admin interface instead of (no content …) or (no title …) due to no title or excerpt.
I have tried using a hidden field for the title with a default option and a uses option like for slug but couldn't make it work.
Is there a way to achieve a dynamically generated title based on other field values?

Solved using the title_format option like title_format: [month, type] in the contenttype definition.

Related

Using Dlookup in the Default Value field of a form control

I am trying to populate a form controls default value based on the value of a combobox on that form. The combobox is called Title, and I want the control HIPAA to populate based on the value of HIPAA in my table tblTrainingEventTiles where the Title selected on the form matches the title in the table.
I was putting the following code into the default value of the control on the form:
=IIf(IsNull([Title]),0,DLookUp("HIPAA","tblTrainingEventTitles","[tblTrainingEventTitles].[Title]=[Title]"))
Access seems to ignore it however. It doesn't do anything and there are no error messages. I'm not sure if my problem is with my dlookup or with the fact that I'm trying to use this in the default value field. (or both?) Does anyone have any ideas?
Try this:
=Nz(DLookUp("HIPAA","tblTrainingEventTitles","[tblTrainingEventTitles].[Title]=[Title]"),0)
If your combobox's bound column is text you should use ' around it's content. And you should concatenate value of combobox to filter part of dlookup.
=IIf(nz([Title],"")="",0,DLookUp("HIPAA","tblTrainingEventTitles","[tblTrainingEventTitles].[Title]='" & [Title] & '"))

How to use Like and another function or field from a form in Access?

I have a drop-down menu in a form where you choose the year from pre-entered values. That field is used in different queries to display different data depending on the year you've chosen from the drop down menu ([Field]).
I would like to use this field in a query with the Like operator an a Wild card character.
I have the form open and the value of the [Form]![SubForm]![Field] equals for example 2018. If I try Like "*2018" it works fine.
I tried this but it doesn't work: Like "*[Form]![SubForm]![Field]"
Any ideas on how I could achieve this?
Your original code is taking the text as is.
Like "*[Form]![SubForm]![Field]" is searching for text that is like [Form]![SubForm]![Field].
You need to look for text that is like the contents of the control, not the reference to the control:
Like "*" & [Form]![SubForm]![Field]
The code above concatenates * with the value held in the control.

How do I get conditional output in a report?

I have a table that with a cell that may contain one of several defined words (such as "piping" or "containment"). I want to display a phrase specific to the word based on the word in my table. So if the table says piping, want the section of my report to say "...the piping in this area..." a null value would return specific text as well.
What about a CASE statement? Something like this:
CASE {column}
WHEN 'Piping' THEN 'Piping in this area'
WHEN 'Containment' THEN 'Etc....'
END AS "Project status?"

Use table field description on form

I would like to display a field's description on a form. How would I accomplish this? For example, table name is tblbureau, field name is Counsel with a description 'General Counsel for the Defense', form name is frmCounsel. I'd like to use a control (textbox?) that displays the full description instead of using the default label for the field name. Thanks.
If you have used the form wizards to create the form, any descriptive text is added to the StatusBarText propery. This is even true when you create a blank form and drag fields from the field list to the form. You can refer to this property for your message box, or just refer the user to the statusbar. You can also update the ControlTipText property with the StatusBarText property.
MsgBox Me.ATextBox.StatusBarText
Using the above will save coding to get the description:
Currentdb.TableDefs("atablename").Fields("afieldname").Properties("Description")
Note that the description property is not available for fields when you have not added a descrition, so the above would cause an error.

How do I insert a dataset value to a BIRT report outside of a table / cube?

okay, this has got to be simple - but I can't seem to find an answer...
I am creating a summary report (using BIRT 2.6.1), and laying out a few specific summary values in a grid (not a table or a cube).
Say it's a simple query:
SELECT decision FROM dataTable
I created a data binding / aggregation (named "sumDecision") on my grid, of a type count, where my expression is:
dataSetRow["decision"]
Now, I've tried to insert this into a grid, either as "data" or "dynamic text" with the column binding:
row["sumDecision"]
But when I run the report, it comes up blank. How would I do this? Using dataSet["decision"] doesn't seem to do anything either.
I would create a Text Item (not Dynamic Text, just Text) and use the "Value Of" tags on the text item. This will give you an expression editor and as long as your grid is bound to the data set in question, you will be able to choose your data element there.
Since you just want to see the text in the grid, make sure and choose "HTML" for the format of the text item.
One solution is to create a table of 1 column, 1 detail - then delete the detail & header rows, and create my grid inside the footer of the table.
From here, I can add a dataset to the table, and create aggregations that work to my hearts content.
Is this the right way to do this, or am I missing something?