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

MDK problem when using $expand

Facundo_Quevedo
Explorer
0 Kudos
885

Hello experts I'm encountering a problem with using $expand in MDK. When navigating from one component to another, the target component doesn’t display correctly.  
Has anyone faced a similar issue or know how to resolve it?

Accepted Solutions (0)

Answers (2)

Answers (2)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The ilodata tool is included in the MDK SDK distribution in the Tools folder at the top level.

  1. Navigate to the correct folder Tools/ilodata/<sdktype>/<platform>
  2. Extract the zip file to get the ilodata app
  3. You can optionally copy it to a location in your path or just run from the current path when needed
  4. After install run ilodata from the terminal/command window
  5. You may get a warning dialog that it cannot be verified
  6. Open Security & Privacy app
  7. Under General click Allow Anyways on the "ilodata" was blocked message
  8. Re-run ilodata from the Terminal window
  9. Click Open to confirm you want to run it

After you have installed ilodata you can open the store

 

ilodata store_name=myofflinestorefile store_key=MDK

 

The myofflinestorefile is the name of the offline database without the extension. You can then issue a

 

get <entityset>

 

and use any additional query options.

Facundo_Quevedo
Explorer
0 Kudos

Hi jitendra thank you for the response

  • I´m trying to implement My component Mequipment and show the Measuringpoint data in the mequipment detail, and then navigate to the this measuring point, but when i try to implement this i cant display the data of the measuring point
    Facundo_Quevedo_0-1722430213586.jpegFacundo_Quevedo_1-1722430230165.jpeg

From the equipment detail i call the $expand property like this and from my initialize.action i defined like this

{
            "AutomaticallyRetrievesStreams": false,
            "Name": "Equipment",
            "Query": "MEquipmentSet?$expand=EquipmentNavToMeasuaringPoint"
        },

 

    ,
                    "_Type": "Section.Type.ObjectTable",
                    "Target": {
                        "Service": "/pmp_smart_pm/Services/zpm_odata.service",
                        "EntitySet": "{{#Property:@odata.readLink}}/EquipmentNavToMeasuaringPoint"

                    },

 

  • When i use the $expand from the browser in the mobile destination it show that the $expand works.
    Facundo_Quevedo_2-1722430795996.png

 

 

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you using a branded client in an emulator? If so I would suggest turning off the secure db encryption and checking your offline database after initialization to confirm the entity and expanded data is populated correctly in the offline db using the ilodata tool.  My guess is that the offline db was unable to populate the expanded data correctly from your backend service.

I did a test using the Sample service and the standard MDK List Detail template for Customers.  In the Customers detail page the binding for the SalesOrders is just like you are using.  I changed my offline initialization to include the $expand on SalesOrders and when I run it the data renders as expected.  I also changed the syntax to use what you are showing and still see the data as expected which leads me to suggest confirming the data was populated into the offline store as expected.

Facundo_Quevedo
Explorer
0 Kudos
Hi bill, i am using the public store client.
Facundo_Quevedo
Explorer
0 Kudos
Hi bill, i am using the public store client.
Facundo_Quevedo
Explorer
0 Kudos
Hi Bill, I am using the public store client, but I will create the branded client. Do you have any documentation on how to implement the ILODOTA tool? This is the first time I have heard of this tool.