cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Loading Database Thing Dynamically in the Mashup

snoor
12-Amethyst

Loading Database Thing Dynamically in the Mashup

Hi All,

I am new to ThingWorx Composer. I need to load the database thing dynamically into the mashup based on the user organization permission.

For example:

I have two things name called Factory1 and Factory2.

Factory1 and Factory2 have the same services and properties but different database configuration.

If User1 Login, the application needs to load the Factory1 Thing in the Mashup.

if User2 Login, the application needs to load the Factory2 Thing in the same Mashup.

 

Please suggest me on the same.

 

ACCEPTED SOLUTION

Accepted Solutions

According to your request, build a infotable with column User and DatabaseName, use GetCurrentUser service (CurrentSessionInfo Resources) to get the user name, and bind the related name to previous mentioned dynamic service.

View solution in original post

5 REPLIES 5
zyuan1
18-Opal
(To:snoor)

1. Add new service to a Thing

2. Enable "Dynamic", for entities choose "DataTable" Thing Template

3. Type in the services you want in the script field, Complete

4. The new service will have an input for entity name.

According to your request, build a infotable with column User and DatabaseName, use GetCurrentUser service (CurrentSessionInfo Resources) to get the user name, and bind the related name to previous mentioned dynamic service.

slangley
23-Emerald II
(To:zyuan1)

Hi @snoor.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

snoor
12-Amethyst
(To:slangley)

Hi @slangley ,

 

I got the idea from the above answers,  but I have not tried still due to priority on my task list. Once I tried with the above solution, I will accept the appropriate one.

 

Thanks for the guidance. 

snoor
12-Amethyst
(To:snoor)

@zyuan1  I have tried the suggested approach and its working thanks for the solution.

Announcements


Top Tags