MDT: Create Drop down list for Joining Domain - mdt

We have implemented MDT and it is working fine. We have multiple child domains in our forest. The default parent domain is populated in the Join domain field.
Would it be possible to add a drop down list to be able to select a domain to join like the old screenshot I found below?

Related

Unique form with many tables

I'm trying to create a form to fill three tables to describe some projects with the 'Title of the project' as common field. When I create the form I have to write the title three times, otherwise it's not posible to fill the tables. Is there any way to put just one of the three fields on the form but the three of them are filled?
The database is empty, I want to make a form to start introducing all the projects that are going to be done in my group of work. In one table there are data related to the project, like start dat , full budget etc. In another one the information about my company, like the group its doing it, its role etc. In the last one just some general information like related tags. The name of the project appears in all of them, but when I do the form from a query they seem not to be related even if I do it on the query.
I've already tried to do it with the Wizard tool, selecting the different tables and its fields. I also tried to check the form properties...but I can't come up with what I'm doing wrong...
I'm new using access...

data merging in Tableau

I have two sheets in excel. One has CBG (neighborhood) IDs as shown below.
The second sheet has state and county names and IDs as shown below.
Now the first 5 digits in the CBG ID are just the corresponding state and county IDs for that CBG.
I need to to join this data together in Tableau so that I would have the state and county on the CBG sheet for each CBG.
Basically I tried to blend the data and it didn't work. I also tried to perform a join calculation using the 5-digit code in the second sheet and the LEFT function to extract the 5-digits in the CBG code but it didn't seem to work either.
To fix it, just needed to fix the Join calculation on both sides of the join.
Also, it seems that both variables to be joined need to be the same data type.
The data that you analyze in Tableau is often made up of a collection of tables that are related by specific fields (that is, columns). Joining is a method for combining the related data on those common fields. The result of combining data using a join is a virtual table that is typically extended horizontally by adding columns of data.
When joining tables, the fields that you join on must have the same data type. If you change the data type after you join the tables, the join will break.
Please go through the below steps for joining tables:
In Tableau Desktop: on the start page, under Connect, click a connector to connect to your data. This step creates the first connection in the Tableau data source.
In web authoring: Select New Workbook and connect to your data. This step creates the first connection in the Tableau data source.
Select the file, database, or schema, and then double-click or drag a table to the canvas.
Double-click or drag another table to the canvas, and then click the join relationship to add join clauses and select your join type.
Add one or more join clauses by selecting a field from one of the available tables used in the data source, a join operator, and a field from the added table. Inspect the join clause to make sure it reflects how you want to connect the tables.
When you are finished, close the Join dialog.
Thank you.

Changing a DB View dynamically according the current user-group

we are currently digging into Amazon Redshift and testing different functionalities.
One of our basic requirements is that we will define different user groups which in turn will be granted access to different views.
One way to go about this would be to implement one view seperately for each user-group. However, since we have a lot of user-groups that share almost the exact same need for information, I'm looking for a way to implement this more dynamically in Redshift.
For instance, let's say I have a user group called users_london and another one called users_berlin. Both will have access to a view called v_employee_master_data which contains the columns employee_name, employee_job_title and employee_city.
Both groups share the same scope of information with one exception - the column employee_city.
In essence, the view should be pre-filtered for a certain value in the column employee_city according to the currently logged-in user-group.
In SQL - something like this:
For the usergroup users_london:
SELECT * FROM v_employee_master_data WHERE employee_city = 'London';
For the usergroup users_berlin:
SELECT * FROM v_employee_master_data WHERE employee_city = 'Berlin';
Now to make the connection back to Amazon Redshift. Does the underlying DB runtime provide an out-of-the-box functionality to somehow catch the currently logged user-group as a form of global variable and alter the SQL-statement according to the value of that variable?
It is possible to do:
get current user
select current_user
find what group it belongs to
select groname from pg_group where current_user_id = any(grolist);
Extract city and capitalize it:
select initcap(substring(groname from 'users_(.*)')) from pg_group where current_user_id = any(grolist);
Now you have your city based on the "user". So just inject it in the view
... WHERE employee_city = initcap(substring(groname from 'users_(.*)') ...

Moving CiviCRM custom fields to different Contact type

I would like to take a set of custom fields in CiviCRM which are attached to one Contact type (Individual), and move them to be attached to another Contact type (Organization). The fields are similar, but they are not all identical.
What is the best way of handling this? Export the custom fields and clean up the CSV before importing into the newly created custom fields?
The most efficient way would be straight through SQL:
INSERT INTO civicrm_value_org_stuff
SELECT null as id, c.current_employer_id as entity_id, i.first_field as first_org_field, i.second_field as second_org_field ...
FROM civicrm_value_ind_stuff i
LEFT JOIN civicrm_contact c ON c.id = i.entity_id
LEFT JOIN civicrm_value_org_stuff o ON c.current_employer_id = o.entity_id
WHERE o.id is null AND c.current_employer_id is not null
You'll have to take care of situations where there's already information in the destination table, but otherwise this should work fine. The table names are obviously made up, but they'll begin with "civicrm_value..." and the field names should be clear from that.

In SQL Server 2008R2 can I force a View to use objects within the user's default schema instead of the schema in which the View exists?

A bit of background. I have a base application and most clients use it as standard. However some clients have small code and database customisations.
Each of these clients has their own branch and maintenance can be tricky.
I want to consolidate all these into a single database structure (not a single database - we aren't doing multi-tenancy) to enable upgrades to be applied in a much more uniform fashion.
I'm still at the proof of concept stage, but the route I was going down would be to have the standard objects stay in the schema they currently exist in (mostly dbo) and have the custom objects reside in a schema for each client.
For example, I could have dbo.users and client1.users which has some additional columns. If I set the default schema for the client to be "client1" then the following query
SELECT * FROM users
will return data from the client1 schema or the dbo schema depending on which login is connected.
This is absolutely perfect for what I'm trying to achieve.
The problem I'm running into is with Views.
I have many views which are in the dbo schema and refer to the Users table. No matter which user I connect to the database as, these views always select from dbo.users.
So I'm guessing the question I have is:
Can I prefix the tables in the view with some variable like "DEFAULT"? e.g.
SELECT u.username, u.email, a.level
FROM DEFAULT.users u INNER JOIN accessLevels a ON u.accessID = a.accessID
If this isn't possible and I'm totally barking up the wrong tree, do you have any suggestions as to how I can achieve what I'm setting out to do?
Many thanks.
Just reference the name of the schema in which the views reside...
Select a., b.
from schema1.TABLEA A
join schema2.TABLEB B on A.ID = B.ID