DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Specific channel to the data portal

Hi I am New to the Diadem community,

 

need support on the following thing

In Diadem how to bring the specific channels from the data store to data portal.

Example

in Data store navigated to the database and now approx 10 result showing, is the list having N number of channel, but i need to select only specific channel and bring to data portal.

 

Kindly help on this - thank in advance

0 Kudos
Message 1 of 8
(1,674 Views)

Hi Paul, 

 

As test I have opened the "ASAM Browse Settings Example" via a data store, a screenshot is attached.

You can search for results and import the results into the data portal by: 

 

  1. Right-Click on the channel and select "Load Data"
  2. Drag and Drop as it is done with search results in the results of a MyDatafinder Query
0 Kudos
Message 2 of 8
(1,633 Views)

Hi ColinF,

 

Very Sorry i believe i didn't ask the exact query.

I need this to be done in script vbs.

For example if i have 10 groups in all groups i need two channels named as "Speed" & "Time" that to be popped into data portal.

 

Scenario:

Group 1

            Time

            Speed

            ............N

Group 2

           Time

           Speed

           ..............N

 

Result required in Data portal.

Group1

            Time

             Speed

Group2

             Time

              Speed

 

This is how i need for N number of groups in VB script.

Kindly do needful.

 

 

 

 

 

 

 

 

 

0 Kudos
Message 3 of 8
(1,624 Views)

Hi Paul, 

 

if you use as an example the data store "ASAM Pass Fail Analysis Example 2023"  then you will see that all of your groups include the two first entries Temp_A and Temp_B. According to what you described the following script loads the two entries from every group into the data portal under an extra defined group for each group of the data store. 

 

Option Explicit  'Forces the explicit declaration of all the variables in a script.

Dim oMyDataStore, MyGroupList, MyTempAList, MyTempBList, name, i, Group
Call Data.Root.Clear()
Set oMyDataStore = Navigator.ConnectDataStore("ASAM Pass Fail Analysis Example 2023") 
Set MyGroupList = oMyDataStore.GetElementList("Measurement", "" ) 
Set MyTempAList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_A" ) 
Set MyTempBList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_B" )

i = 0

For Each Group in MyGroupList 
name = Group.Properties("name").Value
Data.Root.ChannelGroups.Add(name, i+1).Activate()
Call Navigator.LoadData(MyTempAList.Item(i+1), "Load", Nothing) 
Call Navigator.LoadData(MyTempBList.Item(i+1), "Load", Nothing)
i = i + 1
Next

 

0 Kudos
Message 4 of 8
(1,609 Views)

Hi ColinF,

 

Thats great working perfectly. I have additional requirement on this. If its ok do needful if i want to post as a separate one let me know.

 

Example:

Main Group1

           Sub Group1

                              Flood

                              Water Level

                              Pressure.....n

          Sub Group2

                              Flood

 

                              Water Level

                              Pressure.....n

          Sub Group3

                              Flood

                              Water Level

                              Pressure....n

Main Group2

           Sub Group1

                              Flood

                              Water Level

                              Pressure......n

          Sub Group2

                              Flood

                              Water Level

                              Pressure.....n

          Sub Group3

                              Flood

                              Water Level

                              Pressure....n

Main Group3

           Sub Group1

                              Flood

                              Water Level

                              Pressure.....n

          Sub Group2

                              Flood

                              Water Level

                              Pressure.....n

          Sub Group3

                              Flood

                              Water Level

                              Pressure......n

 

Out Put Required:

 

Main Group 1

                     Sub Group 1

                                        Flood

                                        Pressure

                     Sub Group 2

                                        Flood

                                        Pressure

                     Sub Group 3

                                        Flood

                                        Pressure

Main Group 2

                     Sub Group 1

                                        Flood

                                        Pressure

                     Sub Group 2

                                        Flood

                                        Pressure

                     Sub Group 3

                                        Flood

                                        Pressure

Main Group 3

                     Sub Group 1

                                        Flood

                                        Pressure

                     Sub Group 2

                                        Flood

                                        Pressure

                     Sub Group 3

                                        Flood

                                        Pressure

                       

Kindly help me out if any example available for inside diadem please let me know i will follow from that.

Thanks in advance.

Really your support helping me a lot.

Tones of thank you.

 

 

0 Kudos
Message 5 of 8
(1,590 Views)

Hi Paul, 

 

I just oversaw that you would like to have three levels also in the data portal. 

The point is here, that the data portal can just have one root element and after that you can add channelgroups and channels. 

 

So the structure you would like to have as an additional requirement is not possible in the data portal. 

You can just have one Main Group = root element and different sub groups = channelgroups and Flood, Water etc = channels. 

0 Kudos
Message 6 of 8
(1,576 Views)

Hi Colin, 

 

I modified the given script as below. 

 

i am trying to load only the groups from this particular main group alone TR_M17_QT_32-1

which have two sub groups QT_32-1_Upper & QT_32-1_lower. its ouput coming, how ever its bring, but the code taking all the main group and providing the output. 

Can you please look this and give me some solution. is some loop function i am making mistake.

 

 

Option Explicit 'Forces the explicit declaration of all the variables in a script.
Dim oMyDataStore, MyGroupList, MyTempAList, MyTempBList, name, i, Group,MyGroupList1
Call Data.Root.Clear()
Set oMyDataStore = Navigator.ConnectDataStore("ASAM Pass Fail Analysis Example 2020")
Set MyGroupList = oMyDataStore.GetElementList("TestRUn", "name=TR_M17_QT_32-1" )
if MyGroupList.Item(1).Name = "TR_M17_QT_32-1" then
Set MyGroupList1 = oMyDataStore.GetElementList("Measurement", "" )
Set MyTempAList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_A" )
Set MyTempBList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_B" )
For Each Group in MyGroupList1
name = Group.Properties("name").Value
i = 0
Data.Root.ChannelGroups.Add(name, i+1).Activate()
Call Navigator.LoadData(MyTempAList.Item(i+1), "Load", Nothing)
Call Navigator.LoadData(MyTempBList.Item(i+1), "Load", Nothing)
i = i+1
Next
end if

0 Kudos
Message 7 of 8
(1,525 Views)

Hi Paul, 

 

I made the change in the example code to reflect your requirement. 

I know it is not the best code, but it is working. 

 

Option Explicit 'Forces the explicit declaration of all the variables in a script.
Dim oMyDataStore, MyGroupList, MyTempAList, MyTempBList, name, i, Group,MyGroupList1
Call Data.Root.Clear()
Set oMyDataStore = Navigator.ConnectDataStore("ASAM Pass Fail Analysis Example 2023")
Set MyGroupList1 = oMyDataStore.GetElementList("Measurement", "name=QT_32-1*" )
Set MyTempAList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_A" )
Set MyTempBList = oMyDataStore.GetElementList("MeaQuantity", "name=Temp_B" )
For Each Group in MyGroupList1
name = Group.Properties("name").Value
i = 0
Data.Root.ChannelGroups.Add(name, i+1).Activate()
Call Navigator.LoadData(MyTempAList.Item(i+1), "Load", Nothing)
Call Navigator.LoadData(MyTempBList.Item(i+1), "Load", Nothing)
i = i+1
Next

 

 

0 Kudos
Message 8 of 8
(1,494 Views)