Solved

How do i use expand in indicium?

  • 6 December 2022
  • 4 replies
  • 55 views

Userlevel 6
Badge +16

How do I use the expand functionality in indicium? Whatever i try i always end up with invalid odata url. 

I tried creating an expand statement based on the documentation, either the documentation is incorrect or I am missing something here. 
https://docs.thinkwisesoftware.com/docs/indicium/api#expand

the community wont allow me to add the link I use so i added a picture. I tried on tablename, id name, lookup name. Nothing seems to work. 


 

 

icon

Best answer by Anne Buit 6 December 2022, 13:48

View original

4 replies

Userlevel 7
Badge +5

The so-called ‘navigation-property’ for expands uses a prefix on the last reference column.

To get directly to the look-up table (in this case, gitaarr), you can use lookup_gitaar. If the display would be ‘further up the chain’, you can short-circuit using transl_gitaar. Either would work in this case.

kerry?$expand=lookup_gitaar($select=nameidx)

 

 

Userlevel 6
Badge +16

This works, does this mean the documentation is incorrect? Since the documentation states this, which both don't seem to work. : 

 

 

Userlevel 7
Badge +5

Based on the documentation, the following URLS should work in your case:

kerry?$expand=transl_gitaar 

to select all columns from both kerry and gitaarr

kerry?$select=valuut&$expand=transl_gitaar($select=nameidx) 

to select valuut from kerry and nameidx from gitaarr

Userlevel 6
Badge +16

They both work, I guess once you know how it works the documentation makes sense. Thanks. 

 

Reply