I have inherited a PowerApps Canvas app that uses SQL Server as it's data source. The tables involved are Customer, Project and Work Order.
I’m building a Create Work Order Screen that requires the Customer ID, Project ID and Work Order Item IDs. The tables have foreign key relationships. How do I add all required tables as a collective data source? It seems that Canvas PowerApps are limited to single entities but need to confirm this.
Looks like by enabling some Experimental switch, you can achieve this.
Basically you have to add extra screens, Data sources and then simple formula will do the trick for you to set/filter/choose the related records.
Reversing the Relationship: One-to-Many
For every Many-to-One relationship, there is a corresponding One-to-Many when coming from the other direction. Making the One-to-Many relationship easily accessible is the feature we are introducing this week.
To get started, go to the File menu, App settings, Advanced settings, scroll to end of the list, and turn this switch on:
One-to-Many Relationships for Canvas apps
Related
I am in process of designing a reporting tool. the Interface will be C# with backend database. The tool will allow to enter and edit data through an interface and save it to the Database. Additionally, it will provide specific reports, based on the data retrieved from DB.
Currently, I have been trying to solve a M:N relationship in for my DB tables.
The tool lets a user to enter daily Item amounts (Steel and Mesh) based on a Project. I have solved the M:N relationship in the following diagram but I am not sure if this is actually possible and whether I need to break down the daily stats table further, due to a composite key containing 4 PKs from other tables. This is the current diagram i got.
I am wondering whether the diagram has solved the M:N relationship correctly and whether there is a better way to utilise the date table.
I am new to 2sxc and am trying to build a relatively complex website using this module as base for developing the data modelling.
My site consists of lots of different Apps (in my view), like news, events, people, workgroups, etc.
My question is how should I address the relationships between entities:
on one hand, I know that I can create relationships if all entities belong to the same APP. But this does not promotes reusing existing apps and makes a single app more complex.
on the other hand, creating different apps, would promote reusability but has the additional complexity of cross app entity relations (if that is even possible?).
Are there any recomendations on how to tackle these issues and how to setup a cross app relation?
Ex: WorkingGroups has a relation to people (one to many)
Both Events and News share a relation to Categories (tags)
An App is a self-contained unit which can be exported/imported and should still work. So if items in an app relate to each other, that is how it's meant to be.
If you create cross-app relationships (this is possible) then you lose integrity checks and similar.
So if you have complex issues tightly related it should be in one app.
If you have multiple apps which just use another app for additional lookup, that is possible
EG: Let's say you have a people-app which describes the people, and you want to have other apps (like news) which mention a person - and the goal would be to be able to click on that person to get that profile or similar, this is how you would do it:
Create the people app
Create the news app
In the people-app, make sure you have a unique ID for a person. I wouldn't use the data-id (a GUID) but rather a person code (like DM for Daniel Mettler) or similar.
In the news-app, also create a person-id field. For simplicity, let's say it's just a text-dropdown. You could also create a data-dropdown which gets data from the other app, but that's advanced - so do this later. For now, make a dropdown and pre-fill the IDs of known people.
Now you can create all the views etc. Make sure you add some null-checks and similar so the code doesn't break if it doesn't find the ID in the other app.
I'm working on a QuickBase application and I'd like to be able to generate an image representing the table structure of the application.
I can generate a list of tables and the relationships between them in any fashion needed - I just need a library that will tell me what format to feed my schema and have it spit out an ERD image of the schema.
Does something like this exist? Preferably, it would be something I could script because I'll be using the QuickBase API to generate the schema. Bonus if it will also let me display the fields, unique/primary or otherwise.
QuickBase recently released the relationship diagram in the product. You can view the table relationship and also drag around tables to define your layout. It also gives you feature like table information (links to fields page, number of fields) and option to show the primary key field involved in the relationship.
Here is the link to the help documentation
relationship diagram
I'm working on a user facing django application for an enterprise solution. Currently, users are able to categorize data on the site into private collections, visible only to themselves. A feature request is for managers to be able to view the private collections of their subordinates.
My issue is, what is the best solution for implementing this hierarchy? I've thought of a few solutions:
A foreign key from user to user named manager. Create a #user_passes_test test that recurses through the manager relation looking from the owner of the collection until a) the requesting user is found to be a manager, or b) manager is Null, indicating the requesting user is not authorized to do access this page.
Benefits: simple hierarchy is accurately represented with minimum data
Drawbacks: A large hierarchy results in many queries
Create a many to many relation between users and users called managers. Create all the relationships in this table.
Benefits: Only one query necessary, and users can have multiple managers.
Drawbacks: difficult to change the hierarchy when someone leaves.
I'm open to any other suggestions people have, as well.
A tree of uniform data (where the data referred to by nodes and leaves is of the same class) can often easily be maintained by an SQL-based tree structure. While you can always write one by hand, Django MPTT and Treebeard have both dealt with the issue. I've used Treebeard, but MPTT seems to be more popular.
I'm trying to be a good developer and create some documentation before I start programming my next project.
I have created a database schema diagram in Visio and created relationships between columns.
However, I am looking for a way to make the relationships between columns more clear. I want the arrow to connect column to column.
Is there a way to do this in Visio?
You can use the Visio Drawing tools to force the Relationship Connector to glue to particular Connection Points on the Table Shapes:
Turn on Connection Points in the View menu.
On the standard toolbar find the Connector Tool just to the right of the Pointer Tool. Click on the little arrow and change to the Connection Point Tool.
Hold Ctrl and click on one of the Table Shapes at the point where you want to join the Relationship Connector.
Do the same on the other Table Shape.
Glue the ends of the Relationship Connector to the Connection Points you just added.
You will have broken the relationship. To fix it, select the Relationship Connector and view the definition of the relationship in the Database Properties Window.
Associate the fields again.
(This was tested with Visio Enterprise 2003.)
If you click on the relationship arrows, green midpoints will appear. You can use these to drag the relationship arrow up and down. Be careful not to move the endpoints, though, because Visio will disassociate that connector from the table object.
To my knowledge this is how visio draws it, and it is not possible to get it to point at an exact column. its kinda annoying, but I guess you learn to live with the FK markings
The answer is that it won't, but you can click and drag the lines around. The method I use to get around this is to name the FK relationships and display the names (there is an option to do this in Database->Options) or to label the relationships with the column.