Fetching data from database in web portal using new Angular based web portal

Hi, we are having trouble understanding how data is retrieved from the database in frontend. We are struggling to find examples of actual api calling methods, instead what we find are variables like data, datasource, entitySchema etc. without any pointers to what kind of data/variables they hold.
As an example we want to include a dropdown with employment organisation, but we can’t seem to figure out how to fetch this data. Even though this data is already fetched in the frontend in the form of item.
Could you provide us with a code example of how to fetch/extract this or any other data? We are customising the existing modules to fit our needs.

Example of the issue:

 

We are using version 9.1 and the new Angular based web portal .

Regards

Anders Westby

  • Hi Anders,

    The component shown in the screenshot is a generic picker for any foreign-key relation in the data model. It gets data model information but it does not know about its context, so it does not know about what kinds of data it is showing.

    it sounds like you are trying to show additional data on some specific form. In that case, this component would probably not be the correct location to modify.

    Can you elaborate on your use case a bit further?

  • I'll reply here because it's a case we're dealing with now.

    The question is how to add extra columns to a dst table representation? Where:

    • Some columns are FK to another table. In our case, we want to show accounts (gapuser) and other data (primaryemail, is inactive, etc..) with their corresponding license (gapuseringapasku) in the same dst.
    • Columns which are not part of the default EntitySchema but I am able to read them via api using the "WithProperties" flag. These are , for instance, custom columns added to the table.
  • Regarding the "columns which are not part of the default entitySchema" part, I've solved it.

  • Hello Juan Carlos,

    About your question:
    Some columns are FK to another table. In our case, we want to show accounts (gapuser)
    and other data (primaryemail, is inactive, etc..) with their corresponding license (gapuseringapasku) in the same dst.

    What is your exact use-case for this?

    Because from my technical perspective dynamically displaying entities with correct data type combined from two or more entity types doesn't seem let say easily possible/practical.

    As example (away from Angular) if you try to do this by scripting on the Entitylayer you can use a join to identify the data to load.
    But a collection always loads entities of one specific type. So if the Entitylayer doesn't provide this it would be logical to think that it's also not possible in the Angular project.

    Maybe this use-case is more suitable implemented as a sql view used in a report.

    I didn't want to leave you hanging, so I gave it my best shot ;-)
    Niels

  • First of all, thank you so much Niels. I really appreciate your help. 

    Data is scattered, you cannot find everything related to an entity on the same table. We need to show a list of google accounts with some of their features, including the license. Admins can order the list, filter it , so they can obtain a comprehensive view of the status of the service.

    The person.service.ts has perhaps some examples of how to achieve what I'm looking for, but most features are not documented (surprise, surprise). You can create a fk relation and fill it with data. Thing is I get lost and it all becomes a try/error method that makes development painfully slow  The github page has an example for data tables, but as the article reads, "Data tables offer a lot of configuration possibilities. We will present the most important ones in this sample.". Well, yeah, thank you.

    We told OneIdentity in Barcelona, we said again in Madrid: No documentation at all. And here we are, still undocumented, moving blindly our web pages from the designer to dont know where. I'm giving up on this, I'm really p*off. Guys, if you need help, purchase your help. Maybe that's the goal.

  • I agree we should spend most of our time solving business problems/needs not figuring out how things are supposed to work by endlessly digging around, trial and error and decompiling dll's. But as long as documentation, design patterns, best practices and other technical trickery are treated as proprietary knowledge it's hard to really get going as a small in-house team without purchased support from Quest or a partner. You don't see (m)any of the OneIM partners publicly sharing sync or angular projects on github, blogging or helping out on the forumn. But then again that's their right (business model).
    Not that our banter is going to solve anything, but it felt good to have said it!

  • Couldn't agree more with you. One thing about the business model: Without customers, there's no business. 

    And yet here we are. In your case, providing invaluable support Clap 

    I might check back in here in the future , but for now, my time in the forums is done.