Drupal 9: How to reference a view in a paragraph field type - view

In my Drupal website, I'm using the paragraphs module to build the pages's main content. One of my paragraph types is called 'News'. This paragraph type contains a field that should reference to a 'recent news items view'. This view is already created, but I can't figure out the setup to reference this view in my paragraph field. I already tried many configurations and followed a few tutorials, all with the same result.
I think the issue lies with creating the new field. When creating the field, I have to select the field type. According to me, this must be 'Reference > Content'
Thereafter I must setup the 'Field settings > Type of item to reference'. There I go for 'Content > Content'.
The problem now is that I can only select my 'content types' as a reference, while I must be able to select a view.
So my final question is; Which configuration to choose, so I can select a view as output?

Views are not referenceable by a field by default. You need either the Views Reference module:
https://www.drupal.org/project/viewsreference
... or the Block Reference module:
https://www.drupal.org/project/blockreference
This will allow you to add to your paragraph type a field that may reference your 'recent news items' view.

Instead of Reference->Content select Reference->Other.
On the next step change "Type of item to reference" from Content to View (it's at the bottom of the list).
Click "Save field settings"
On the next screen click "Save settings"
Optionally go to "Manage form display" tab and change widget for the field (by default it's autocomplete field)

Related

Changing Epicor ERP10 standard system code

How can I change Epicor ERP10 standard system code for Purchase Requisition Entry in the Line pane? I would like to change the Due Date from displaying current date to blank everytime making a new line. Please help me.
You can do this using Method Directives.
Here's how to add one.
Find and open Method Directives Maintenance (System Management/Business Process Management/Method Directives Maintenance)
Click on Method Code, select your business object (Req in your case).
Click on Search and select the appropriate method from there (since it is an Add Line event that you want to work with, it should look something like GetNew...Detail). Click OK.
Go to Post Processing tab and hit New on the toolbar.
Give this directive a name you like and click on Design.
Here, in the BPM Workflow Designer, scroll to the bottom of the panel on the left and drag the Set Field icon to the right from the Setters section.
Now when this Set Field... icon is selected, it should show you a table with a column called Action. The next part should be intuitive in itself, but I have gone through the steps and written it here anyways.
Select DueDate field of the ReqDetail table (under specified field section). Set it to null for the new row here.
Save and Exit.
This should do the job, or if it doesn't do exactly what you want. There's always more options in the Method Directives Maintenance section that you can fiddle around with. Good luck.

Unable to display all properties of an object passed between amx pages

I am facing a difficulty in displaying the properties of an object passed from an amx page to another. My aim is to display all the fields of an object of class employee{String name,int age,String phone} on a separate amx page. But I'm only able to display the name field.
Here is my empList.amx
Here is my EmpDetails.amx
The reultant display on my simulator for EmpDetails.amx shows just the employee.name property and nothing else
You have to manually add other properties in to the bindings. Here you added only the 'name' property in the row. name property automatically bind with the Listview object while drag and dropping ListView component from the palette.
Follow the below procedure
Select the bindings tab in the amx page where you defined the
ListView.
Select the object collection and click on the edit button (pencil).
Inside the edit popup, drop the needed properties in to the binding
region and click apply button
otherwise add the values manually in the *************pageDef.xml
file. Xml link provided in the bindings tab.

Add record with ID, selecting NAME from another table

Can anyone, please, help me with Libreoffice Base form creation?
I have the following tables:
And I'm trying to add a form to enter new RESOURCES record with the following fields: [RESOURCE_NAME], [CURRENCY_NAME] and [AMOUNT]. But after 10+ tries I have not succeeded. I have tried adding it via wizard, selecting RESOURCES as main form and CURRENCIES as subform and vice versa. I have tried VIEWS and forms based on them. These tries only gave to me or no possibility to enter new record, either creation of the new CURRENCY.
I don't need to create new currency via this form, I only want to enter new Resource (only enter once, not to modify, not to delete). Since I don't want to remember all the ID's I want to select currency name via DropDown list.
Can anyone provide instructions about how to do it, please?
Thanks.
You do not need a subform for this - just create your form document with RESOURCES as the main form (only form).
You will need a listbox to enter the currency item. A listbox has two fields, a display field and a field that is saved in the table. You will set it up to display CURRENCY_NAME and store CURRENCY_ID.
When you create a listbox, the wizard that pops up may get you what you want. If the wizard falls short:
Make sure the form document is open in design mode: on the "Form Controls" toolbar, the leftmost/topmost icon of a pencil with a triangle should be depressed. If this icon is grayed out, close your document, right-click on its name and choose "Edit".
Right-click on the listbox and choose "Control"; this will open the properties window
On the tab "Data" change the "Type of list contents" to "Sql"
In the field "List content" enter SELECT "CURRENCY_NAME", "CURRENCY_ID" FROM "CURRENCIES" ORDER BY "CURRENCY_NAME"
The Bound Field should default to 1. If it isn't 1, change it to 1.
Close the properties window and save your form. It should work as you want now.
If you want a listbox inside a tablegrid: after you create the table, with the form in edit mode, right-click on the column name you want to change and choose "Replace with" and then "listbox".
Edited to include comment by OP about bound field needing to be 1

CRM - 2015 - CheckBoxes

IS this possible to have check boxes in crm 2015 page (not through web resource) , I tried to implement couples of solution with js but did not work out. Any comments would be useful.
You can add checkboxes by creating fields of type two options. Then, add them to an entity form and in the field properties window, change the format to "checkbox".
Check this out: https://www.microsoft.com/en-US/dynamics/crm-customer-center/create-or-edit-entity-fields.aspx
Possible data types for a field
Two options
After creating this field, configure it in the form to which it was added. In the form, select whether the field is displayed as option buttons (also known as radio buttons), a check box, or a list.
Cheers.
In the Dynamics CRM entity form editor:
Click New Field button on the extreme down-right corner
Provide Name to the field
Set data type as Two options
Save the record
Drag this newly added field into the form from the right side field list
Click Change Properties in the menu bar
In the pop-up click the Formatting tab
Select Two radio buttons / Check box / List in the Control formatting section
Click OK

Creating Custom List Definition using VS 2010 without creating Custom Content type

I want to create Custom List Definition without creating custom content type. Way I followed is created farm solution without list instance -> In the elements.xml file I gave 10005 as a type and in the Schema.XML in the section I added custom fields and also in the default view as well. When I deployed this project and created list based on this definition and clicked on the "New Item" it didnt show Custom Columns but only the Title Column. To solve this I removed whole content type section from the Schema.XMl and deployed the solution again. I created list based on the List definition this time clicking on the "New Item" link in the list view it shows all the custom columns but when I go to ribbon and click on the "New Item" drop down it does not show "New Item" but it shows the name of the list instead and also it adds the name of the list as a content type. I can understand this behaviour as I removed content type section from the Schema.XML but how can I add custom columns to Item Content type ?
In the Schema.xml file you need to:
Declare the fields inside the Fields node (the same way you would if you were creating site columns)
Update the default view to show the newly created fields (if necessary)
Delete the ContentTypes node
I cover this in detail in the Creating Lists using CAML module of my Pluralsight SharePoint 2010 Lists and Libraries for Developers course. You could watch it using a trial subscription.

Resources