How to modify attribute table in QGIS - maps

I'm trying to create a global map grouping countries by some criteria, in QGIS, I download one template with all countries, and I'm trying to update this dataset.
I opened attributes table --> edit -->add column, and after I choose the calculator opcion and I use if "id country" = "US" then 1, "id country" = "GB" then 2.... etc
and after I save this table, but when I try to close and open the same table I see that the changes are not saved, and I can't use after this.
Do you know how can I save this changes permanently to use this new column in categorizing by colors?

For add an new field in the attribute table you need .
select the layer
open/show the attribute table
active the editing for the table (pencil button left above on attibute
table)
Open the field calculator
Add the field you need and press ok when done
deactivate the editing for the table and save the changed layer
anyway you could remap the value for change color directly in layer properties changing the style as catogorized (in the layer style top combo) and adding a proper value mapping for each value in specificied section

I would recommend you to check this:
https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html
and jump to the section:
Introducing the attribute table interface
where you have all relevant icons explained.

Related

How can I reference a previous selection from a UI list and change a second row accordingly?

I have a table of Hazard labels with a column of shorthand and another of the longhand version.
In my user interface I have a dropdown menu to select the shorthand hazard label from that list and am wondering if I can reference this decision in realtime to automatically update the longhand field without additional selection?

How can we use a redux form in react table? Also to have need same form for each rows?

I have to create a table with different type of fields like text box , drop-down , toggle button etc.
For eg below fields for 20 rows
Name - textbox
Gender - dropdown
I was thinking of creating a redux form and embed it into a table and repeat it for each rows. Also want to bind data per row.
But not sure how to progress with it. Please help and suggest any other way. Due to certain restriction I could not use available components..so I have to create my own component

How to update API Name of a Custom Label

Need to update "API Name" of Custom Label but "Name" field of Custom Label is Read only on Edit!
There are too many Labels to be updated, Do I need to recreate all and delete earlier?
is there any way to modify/update API Name of a Custom Label ?
You are right, if you want to rename API names of these labels you need to delete and recreate them with correct names.

How to add new Dimension Attributes to the existing dimension through BIDS

I have a customer dimension. While creating cube and defining dimensions the default attributes will come along with the cube creation. I want to add some more attributes after creating the dimensions. How to do this. I tried with "Add Business Intelligence" option, but I failed. Is there any way to do like that. If we remove the dimension and add the dimension again, we can have a interface as "Select dimension attributes". But with out deleting the existing dimension, how to add the attributes to that dimension. Following screen illustrates adding dimension attributes. How to see this interface for existing dimension.
After clicking the dimension attribute tab and clicking on the "Edit datasource" option.. following screen is showing. Here where we can add the attributes?
Assuming that your DSV includes the columns that you want to add as attributes, and assuming that you have an existing dimension, you cannot open the Dimension Wizard again to add more attributes to your dimension. Instead, on the Dimension Structure page (as shown in Diego's screen shot), you have the Attributes pane on the far left where each attribute is listed and you have the Data Source View showing the diagram of your table. You drag a column from the diagram on the right to the Attributes pane on the left. That creates a new attribute.
The image above shows the cursor appearance as you drag the column into the Attributes pane. The image below shows the Attribute pane after you release the mouse button - the new attribute appears as shown.
you have to edit the DSV.
On the "Dimension Structure", "Data Source View" tab, right click any blank space and select "Edit Data Source View". It will bring you to the DSV. Do the changes you want on the DSV and they should be available to be picked as attributes once you get back to the "Dimension Structure"
The solution by #Stacia will work if the Dimension is based of a Named query.
If the dimension is based of the table then the "Data Source View" window is empty you cannot drag attributes.
The solution is to add the attributes manually. Click "View Attributes as List" and add the attributes manually. Please see the link below. This helped me.
http://technet.microsoft.com/en-us/library/ms174567.aspx

Styling views in Drupal 7

I developed a content type of "sale car". Now I'm developing its view to display a brief list of Car Ads with some basic fields (car, model, color, price, link to full ad) inline of each other like this:
BMW, 120 d $X,xxx,xxx.xx
Royal Blue, Automatic, View Ad
I'm wondering how can I achieve this style? What style format I should use: Table, Grid or something else? Or do I need to get it done through coding?
You want to create a view that is a list of fields.
Once you've got this, add the relevant fields into the view and you should be done.
Choose the relevant format from the format link, check the preview and you should have your view.
To create the view structure:
Node 1 Node 2
Field 1 Field 2 Field 1 Field 2
Field 3 Field 4 Field 3 Field 4
Add all four fields to the view. On each one select "exclude from view". At the bottom of the field list, add a new "custom text" field.
Do exclude this one from the view though, that's important.
Go into the custom field and in the textarea you can enter HTML code and use the replacement patterns to output the field.
For example:
<h2>[title]</h2>
<ul>
<li>[field_one_name]</li>
<li>[field_two_name]</li>
</ul>
<ul>
<li>[field_three_name]</li>
<li>[field_four_name]</li>
</ul>
Get the name's from the Replacement Patterns box under the textarea.
Then select whatever format you think is right. I think you're after a grid.
Drupal provides a way to style the view.
Go to your view.
Click on 'Advanced' link at right side.
Click on link after the label 'Theme'.
You will get the list of templates used to style the view.
Create your own template with one of the given name in the list for
specific fields. e.g. views-view--VIEWNAME.tpl.php
You will get the view of your own style.
This is how the Drupal views styling works. :)
Styling views in Drupal 7:
Add field(which to display) and check the option "Exclude from display".
Now go to "Rewrite Results" and check the option "Rewrite the output of this field"
and below there is a section called "Replacement patterns" where all the added
fields appear as a variable(saying variable just for easy understanding)
Like :
[title] == Content:
Title[field_event_date] == Content:
Event Date[body] == Content:
Body[body-value] == Raw value
Above there is a text ares called "Text" where you can customise your style
for this field(Not good practice follow step 4 for better)and clicl "Apply All".
Now add one more field(this is an extra field) called "Global: Custom text"
DO NOT check "Exclude from display" and below text area called "TEXT"is
the area where we will be writing our HTML codes for styling the views
using all the fields which are avalable as token here under the option
"Replacement patterns".
Click on the "Apply All", And YES its done.So simple and cool na??

Resources