how do I show multiple fields of the entity referenced - drupal-7

I have a first content type that's referencing another content type with fields called title, phone, email and room. I'd like to reference all those fields into my first content type, but when I set up an entity reference as a field in the first content type, I only get the title, and not even as a link. How do I do this?

For link on title please check 'Manage Display' option under edit content type.
Thanks
Cheers!!!

Related

PowerApps LookUp with ComboBox to create DefaultSelectedItems

I am still quite new to PowerApps and I have run into a little problem.
I have a field, calibrator, of type person or group that an individual should fill in if they are filling out the form. So, what I did was auto-populate using Office365Users function to display the name of the users.
I then want to use the said field to fill out another field, Title, that should be auto-populated using a LookUp function to see if the calibrator is equal to another field assigned to, of type person or group. The function I used here was
LookUp(List, 'Assigned To' = DataCardValue.Selected.DisplayName, Title(of type single line of text)).
The issue I run into is when I auto-populate the Title field through DefaultSelectedItem, the LookUp function produces a Expected Table Value error. I am not sure what the reason for the error is, any help would be greatly appreciated!
Since you're using combobox, If you look carefully at the property it's DefaultSelectedItems.
So you need to use Filter instead Lookup hence the error saying Table Value is expected. Try this
Filter(List, 'Assigned To' = DataCardValue.Selected.DisplayName)
And if you want to display Title, you need to change DisplayFields property to
["Title"]

Drupal 7 Views: Term filter with relationship

I have 2 content types:
One content type is named: "Offer". This content type includes a reference field to choose one hotel, form the other content type: "Hotel". The content type "Hotel" has a term reference field called "sports".
Now I want to build a view filter, which uses the content type "Offer", and uses the sport terms which i get over the hotel relationship.
I already tried to create a relationship on my own:
Reference to the hotel
Added taxonomy field sport with the relationship to the hotel, which i created before
Then i added the taxonomy field to my filter, and selected the Relationship in the drop down menu.
But this doesn't work at all.
Anyone can help me?
Regards M.
The view should initially return the hotel content type.
Add a optional relationship to the offer reference field, this will give you access to the fields in the offer content type. Once you've done that you should be able to add whatever field you want as an exposed filter.
To get the sports working you may have to add the relationship Has taxonomy term in order to get what you want and then add the term as an exposed filter.
Use the patch over at https://www.drupal.org/node/1492260 for autocomplete.
A select list should work the same way as with this patch, but it's built-in. In either case, you have to enable it by checking the checkbox in the content type field config.

Drupal display views block when a referenced filter from another view is used

I have a page view(1) that filters a content type by diferent field results, one of them is a referenced entity and I'd like to display it's whole content whenever a filter by this referenced field is used.
I've created a block view(2) that displays the referenced entity and tried to use contextual filters to display it only in the results view page when it is used aa a filter but I haven't find the correct way to do this
I've tried to provide a default value for the content id from the url but I the field value responds to target_id, I've also tried to use php with something like: echo ($_GET['field_nameofthefield_target_id']) but it didn't work out
Could anyone help me with this please?
thanks a lot in advance

How do I get the SalesForce record id in a custom field

I wanted to add a simple read-only URL-field to 'opportunities' in SalesForce that contains a link to an external webpage with the 15-char record id (used in the salesforce urls) attached to it . To do this I wen to /ui/setup/Setup?setupid=Opportunity --> fields and created a new field under 'Opportunity Custom Fields & Relationships'.
I chose a field with data type 'URL' and added a default value. I thought
"http://example.com/?sfid="&id would do the trick, but this returns
Error: Field id may not be used in this type of formula
This is a vague error. Is my syntax of a default value wrong, or am i using the 'id' parameter in a wrong way? And what is the right way to do this?
I'm new to SalesForce, as you probably already have guessed.
As the other answer stated - Id will be known only after insert meaning the "default value" trick won't work for you.
You have some other options though:
Workflow rule that would be populating the URL field after save.
Formula field of type text that uses HYPERLINK function
HYPERLINK("http://example.com/?sfid=" & Id , "See " & Name & " in ext. system")
Custom link (similar to custom buttons, they appear on the bottom of the page layout. Search them in online help)
The difference between 2 and 3 is quite minor. Custom links can appear only on the record's detail view while formula fields & other urls are well... fields - so they can be used in reports, listviews etc.
You'd have to decide which version suits you best.
This is a great question. You're right, the error is very vague.
To begin with, read some of the documentation on default fields. Pay particular attention to the order of operations:
The user chooses to create a new record.
Default field value is executed.
Salesforce displays the edit page with the default field value pre-populated.
The user enters the fields for the new record.
The user saves the new record.
Default field values are calculated before any other record data including the id are available. For this reason, they cannot be calculated based on other record fields. Especially the record id, which has not yet been assigned.
To get this functionality, you will need to create a workflow rule that fires on record creation and inserts the proper value into your field.
It would be nice if we could have formula URL fields, but we don't. EDIT: I am dumb and forgot about using HYPERLINK in text formula fields, as eyescream correctly points out.

layout for article by css and get fields with php

I would insert some custom article in drupal. That every article,
some fields that I decided.
Then I would like these article are displayed with a graphic set from CSS.
So I would take for each article, the fields with php.
How do I post article with the graphics set to css? and how to take php variables?
Thank you.
From your answer to my comment it sounds like you would like to edit the article content type and then "theme" the resulting page.
You can add fields to any content type (or add new content types) in "Content Types" in the admin. Select the type you want (article) and click "Manage fields". Here you can add as many fields or whatever type as you like. Each field will be given a machine name, widget and there will be a wizard to follow that explains all the relevant options.
Once all your fields are added, click "Manage Display" to change the order and way the fields are displayed.
To add a template to your theme, create a folder in your themes folder called "templates". Then copy node.tpl.php from root/modules/node/ to this new folder. Rename the copied file to node--machine_name.tpl.php. So for the content type "article" you would change the file to node--article.tpl.php.
Clear your cache (admin/config/development/performance) and that content type will be using that new template. By default all fields will be displayed by this line of code print render($content); If you comment that line out you can display fields individually but taking the fields machine name and doing <?php print render($content['field_page_image']); ?>
Read up on Drupal theming, there are a lot of good docs out there.

Resources