In my Documentum object type, I want to create a "direction" attribute that can have the values "north", "south", "east", "west".
So in the Documentum Administrator tool, in my object type's "Properties" dialog I selected the "Attribute" tab, pressed the "Add" button, and got this screen:
As you can see, it only lets me select Boolean, String, Integer, ID, Time, Double.
Using the "String" type sounds loosy, as it offers no other available validation than string size. Or is there a hidden way to add some kind of conditional value assistance that would restrict choices to a fixed list?
Note: I can't use Documentum Composer.
You can do it by these DQL queries:
ALTER TYPE test_type ADD direction STRING(16) (SET "label_text"='My selectable attribute')
ALTER TYPE test_type MODIFY attribute1 (VALUE ASSISTANCE IS LIST ('north', 'south', 'east', 'west') IS COMPLETE) PUBLISH
It is possible to execute them in Documentum Administrator in Tools -> DQL Editor.
Related
I have a list in sharepoint online.
And in this list, i have a person field.
When i call the API endpoint to get all the items in the list, i get an LookupId value for the person field.
I tried to get the user by using the value of the lookupid, but it don't work because the id is not recognized.
The lookupid is a int (eg: 21) instead of a guid.
Is there something missing in the configuration of the person field or in my calls to Microsoft Graph API ?
When a user signs into a SharePoint site collection for the first time, a ListItem is created in a hidden User Information List. The LookupId in a PersonOrGroup field refers to the ListItem in this list. The URL for the User Information List for SharePoint Online should be:
https://{yourTenant}.sharepoint.com/{yourSiteCollection}/_catalogs/users/detail.aspx
Since the User Information List is a generic SharePoint list, you can query the list via Graph. First, get the list id for the User Information List. An easy way to get the list id is to view the source for the User Information Site via Chrome and search for 'listId'. You should find a result like this:
"listId":"{yourListIdIsHere}"
Copy the id. By using the copied id, the id of your root site and the LookupId, you can get the ListItem in the User Information List:
https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{pasteCopiedListId}/items/{lookUpId}?$expand=Fields
The ListItem contains information about the user, such as the email, which can be used to identify the Azure user:
https://graph.microsoft.com/v1.0/users/{eMail}
Question: How could i get the hidden User Information List from Microsoft Graph?
If you do not want to use the 'trick' with Google Chrome to get the id, there is another way to get the site. Typically, if you want to get the id for any site, you would call:
https://graph.microsoft.com/v1.0/sites/{siteId}/lists
However, you will not find the id of the User Information List, even if you include hidden sites. I do not know why. An additional problem seems to be, that you cannot filter lists by their name:
https://graph.microsoft.com/v1.0/sites/{siteId}/lists?$filter=name eq 'users'
The query returns an error, that the provided filter statement is not supported. The only way to get the list without knowing the id seems to by using the property displayName of the list. However, the displayName is based on your localization. So, since I am from Germany, I can get the site by using the query:
https://graph.microsoft.com/v1.0/sites/{siteId}/lists?$filter=displayName eq 'Benutzerinformationsliste'
You will need to replace Benutzerinformationsliste with your localized name. For EN replace it with 'User Information List'.
This returns the expected result:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('xxx')/lists(id,name,displayName)",
"value": [
{
"#odata.etag": "\"xxx\"",
"id": "xxx",
"name": "users",
"displayName": "Benutzerinformationsliste"
}
]
}
As you can see, the name of the list is 'users', so why the first filter statement does not work is a little mystery to me. Maybe someone here knows and can help out.
Some of the queries above don't work at the moment.
What I finally found as a good solution - after trying many many queries - is that you can do this by following the few steps below:
1- Get the GUID of the user information list.
Using the title of the list "User Information List" or the name "users" in the parameter "$filter" does not work.
Don't forget 'system' among the properties you select if you want to retrieve the hidden system-lists.
GET https://graph.microsoft.com/v1.0/sites('{site_id}')/lists?select=id,name,system
2- Filter the previous result in order to pick up the ID of the targeted list named 'users'.
By the way, applying this restriction "$filter=name eq 'users'" does not work.
You will get an exception. So you must do the filtering part by writing a few lines of code.
3- Once you've got the list identifier, then select all the items you want. And voilĂ ! The word 'Fields' must be in pascal case (uppercase the first letter ).
GET https://graph.microsoft.com/v1.0/sites('{site_id}')/lists('users_list_id')/items?$select=Fields&$expand=Fields
As #QuestionsPS1991 mentioned, the people field in fact refers to the hidden user list. With the lookupid, we can get the user via below methods:
Get user by id
Get user property by expanding lookup field
//////////// updated
By default, MS Graph does not return this user list. You may hard code the list id or follow ##QuestionsPS1991 suggestion. Below is my test:
The case we are dealing with: We have an item type A which is extended from B. Now we have a user group UG. They have to be able to create type A items in the BO, but not type Bs. Therefor we restricted them in item type level to have the permission to create item type A, but not item type B. These items have their own defined place in the tree and are listed in our Backoffice, so they have their own listveiw section. In this section if we would like to create a new A or B item, there is the + sign for it. The problem is, that the UG doesn't even able to click on the + sign even if they have permission to create type A.
What do we miss here?
The data source in PowerApps gallery was a SQL View.
Search('[dbo].[vwCandidate]', textSearchCandidate.Text, "NameLast", "NameFirst", "MiscellaneousTags", "EmailAddress", "PhoneNumber")
The selected record populated a global variable for the form item.
Set(varCandidate, gallerySearchResults.Selected)
Everything works as expected. Then, I changed the data source to use a stored procedure to move the search from PowerApps to SQL server. After doing so I received the error message
"Incompatible Type. We can't evaluate your formula because the context
variable types are incompatible with the types of the values in other
places in your app"
I cannot revert back to the view that was working without getting the same error. I'm hoping my only option is NOT to use a new variable and change every occurrence in the form/App. I'd like to avoid this if possible.
I cannot view the form so I'm not sure how to debug properly. My hunch is the date fields being returned via Flow are causing the problem. They are 'smalldatetime' types and the Flow is returning a string 'yyyy-mm-ddThh:mm:ss.000' even though 'date' is being requested.
"PhoneNumber": {
"type": "string"
},
"CandidateStatus": {
"type": "string"
},
"DateApplied": {
"type": "string",
"format": "date"
},
Flow JSON here does not seem to like any of the other 'date' format types.
Are there any workarounds from Flow? Should I reformat the date values when I am setting the global variable? Advice?
Turns out, I was on the right track thinking that the DATE data type coming from Flow as a string. Here's why:
A new record was created using a Patch function while setting the global variable:
Set(varCandidate, Patch('[dbo].[candidate]', Defaults('[dbo].[candidate]'), {DateApplied: DateTimeValue(Text(Now())), CreatedDate:DateTimeValue(Text(Now())), CreatedBy:varUser.Email}))
The "DateApplied" field was a "DATE" type in the SQL table and it was coming from Flow as a string "2019-03-13T17:40:52.000". The recordset from Flow was being set to the same global variable when I wanted to edit the record
Set(varCandidate, gallerySearchResults.Selected)
The error "Incompatible Type" (see question for full error message) was due to this field being a "Date Value" in a new record and a "string" in an edit record.
My fix is to remove this "Date" type fields from the patch and modify the Flow to retrieve the newly created record record by ID.
Reset everything back, including the data source, then save and close the app completely, re-test.
Remove any flow connections then save and close the app completely , re-test, then re-add the flow connections.
I don't why but PowerApps some times persist data connection errors until you have close the app down.
And just to confirm PowerApps doesn't support stored procedures as data sources, only as write using the patch function etc.
I have few identical parallel flows(as shown in screenshot). I have convertRecord in each of the identical flows and in the Record Reader I have used "Schema Text Field Property" as access strategy and specified the "Schema text". For Example:
{
"type": "record",
"name": "AVLRecord0",
"fields" : [
{"name": "TimeOfDay", "type": "string", "logicalType":"timestamp-millis"},
{"name":"Field1", "type": "double"},
{"name":"Field2", "type": "double"},
{"name":"Field3", "type": "double"},
{"name": "Filename", "type": "string"}
]
}
Lets say the above schema I have used across various parallel flows ConvertRecord, and now I want to update one field name from Field to Field_Name so is there any way I can do it in one go across all the convert record Schema Text?
If I want to change/update one of the Field in the schema Text do I have to change/Update the field name in each processor manually? Or there is a global way that will change the field name across all the parallel flow I have?
Is there Any way that I can update the Schema Text across various processors In one go?
Any help is much appreciated! Thanks
As you are using Schema Text Field Property so you need to change in all ConvertRecord processor manually.
Try with this approach:
In ConvertRecord processor use Schema Access Strategy as
Use Schema Name Property
Then set up AvroSchemaRegistry and define your schema by adding new property
I have added sch as schema.name and defined the avro schema.
After GetFile Processor use UpdateAttribute processor and add schema.name attribute(for ex: with value sch) to the flowfile.
Now in reader controller service use the Schema Access strategy as Use Schema Name Property and Schema Registry asAvroSchemaRegistry` that has already setup.
By following this way we are not defining schema on all ConvertRecord processors instead we are referring to same schema that defined in AvroSchemaRegistry in case if you want to change one field name it is easy to go into Registry and change the value.
Flow:
1.GetFile
2.UpdateAttribute //add schema.name attribute
3.ConvertRecord //define/use AvroSchemaRegistry and access strategy as schemaname property
..other processors
Refer to this link for more details regards to defining/using AvroSchemaRegistry.
I've got a WCF Data Service setup and can access the table data through the browser url.
Have created a simple Stored Proc which takes in a parameter and then returns some columns from various tables via Joins - how can I consume this?
If you are using an Entity Framework model you could do this:
Open the Model Browser.
Right-click "EntityContainer: (name)"-> "Function Imports" and select "Add Function Import...".
Select stored procedure, specify "Complex" as "Returns a Collection Of", click "Get Column Information" and click "Create New Complex Type".
Add config.SetServiceOperationAccessRule("SomeStoredProcedure", ServiceOperationRights.AllRead); to the InitializeService method in SomeDataService.svc.cs.
Now add a method with the WebGet attribute to SomeDataService.svc.cs that returns an IQueryable of the complex type you defined previously:
[WebGet]
public IQueryable<SomeStoredProcedure_Result> SomeStoredProcedure()
{
return CurrentDataSource.SomeStoredProcedure(1).AsQueryable();
}
The 1 above is a parameter to the stored procedure.
The stored procedure can now be consumed at:
http://localhost/SomeDataService.svc/SomeStoredProcedure