Need table Records of each tenant even if the table is multi tenant.

Need table Records of each tenant even if the table is multi tenant.

  
Hi,
      I have a scenario where i need to get the data of all tenant Even if the table is multi tenant, i can achieve it by Using the show tenant identifier attribute of the table, but in this case it will not bahave like a multitanant table for the same espace and  have to pass the tenant id where ever we are using the table..


Thanks
Rajendra
Rajendra koranga wrote:
Hi,
      I have a scenario where i need to get the data of all tenant Even if the table is multi tenant, i can achieve it by Using the show tenant identifier attribute of the table, but in this case it will not bahave like a multitanant table for the same espace and  have to pass the tenant id where ever we are using the table..


Thanks
Rajendra
 
 Yes, if you expose the tenant id, you will need to filter everywhere else by tenant ID.

Usually I'll have a module that reads the multi tenant data and exposes the tenant ID, so I can write the few Actions that need to work on all tenants, while leave the rest of my application to hide the tenant id.

J.Ja
Hi Rajendra, To get the data for all tenant from a multitenant entity you can simply write a query without curly braces like you write in any oracle query editor like toad. Regards -PJ-
Hi Pramod Jain,
                       In this case i will not get the all columns, it will through the error, because of the structure mismatch, i have more then 75 columns in the table so i dont want to create a structure.


Thanks
Rajendra
Solution
Thanks everyone, i have done it by adding a structure with single attribute (Tenant_ID).
Solution

Justin James wrote:

Rajendra koranga wrote:
Hi,
      I have a scenario where i need to get the data of all tenant Even if the table is multi tenant, i can achieve it by Using the show tenant identifier attribute of the table, but in this case it will not bahave like a multitanant table for the same espace and  have to pass the tenant id where ever we are using the table..


Thanks
Rajendra
 
 Yes, if you expose the tenant id, you will need to filter everywhere else by tenant ID.

Usually I'll have a module that reads the multi tenant data and exposes the tenant ID, so I can write the few Actions that need to work on all tenants, while leave the rest of my application to hide the tenant id.

J.Ja

Hi Justin,

Could you explain this in more detail. I would like to access all tenant data in a back office module. How do we expose the multitenant table data to this back office module ? how does back office module gets updated data each time front office module updates the multitenant data ?

Thanks

Ravi


Ravi V wrote:

Justin James wrote:

Rajendra koranga wrote:
Hi,
      I have a scenario where i need to get the data of all tenant Even if the table is multi tenant, i can achieve it by Using the show tenant identifier attribute of the table, but in this case it will not bahave like a multitanant table for the same espace and  have to pass the tenant id where ever we are using the table..


Thanks
Rajendra
 
 Yes, if you expose the tenant id, you will need to filter everywhere else by tenant ID.

Usually I'll have a module that reads the multi tenant data and exposes the tenant ID, so I can write the few Actions that need to work on all tenants, while leave the rest of my application to hide the tenant id.

J.Ja

Hi Justin,

Could you explain this in more detail. I would like to access all tenant data in a back office module. How do we expose the multitenant table data to this back office module ? how does back office module gets updated data each time front office module updates the multitenant data ?

Thanks

Ravi


Ravi -

In the espace where you have referenced the multi-tenant entity, select it, click "More" at the bottom, go to the "Advanced" tab, and check "Show Tenant Identifier". Click "Close" to get out. Now the tenant ID is exposed, and this espace will see ALL records in the entity regardless of what the current tenant is. It's still pulling fromt he same underlying table so all data updates are instant as you would expect.


J.Ja


Justin James wrote:

Ravi V wrote:

Justin James wrote:

Rajendra koranga wrote:
Hi,
      I have a scenario where i need to get the data of all tenant Even if the table is multi tenant, i can achieve it by Using the show tenant identifier attribute of the table, but in this case it will not bahave like a multitanant table for the same espace and  have to pass the tenant id where ever we are using the table..


Thanks
Rajendra
 
 Yes, if you expose the tenant id, you will need to filter everywhere else by tenant ID.

Usually I'll have a module that reads the multi tenant data and exposes the tenant ID, so I can write the few Actions that need to work on all tenants, while leave the rest of my application to hide the tenant id.

J.Ja

Hi Justin,

Could you explain this in more detail. I would like to access all tenant data in a back office module. How do we expose the multitenant table data to this back office module ? how does back office module gets updated data each time front office module updates the multitenant data ?

Thanks

Ravi


Ravi -

In the espace where you have referenced the multi-tenant entity, select it, click "More" at the bottom, go to the "Advanced" tab, and check "Show Tenant Identifier". Click "Close" to get out. Now the tenant ID is exposed, and this espace will see ALL records in the entity regardless of what the current tenant is. It's still pulling fromt he same underlying table so all data updates are instant as you would expect.


J.Ja


Thank you so much Justin. I am able to see all the tenant records in my back office module.