
Hi guys,
What is the syntax to get a value from a lookup column in Data Card ?
I created apps like this :
1. The 1st screen, a form with some fields which is a lookup column, so it will have a combo box
Those lookup column are created when I create Relationship from my Entity to other entity which are the master of it. So, like Site column, it is a Data type Lookup because has relationship to Entity: Sites, and so on.
2. In other page (next screen), I gathered all information into a collection, from some button "OnSelect" like this :
Collect(colEntry,
{ Site : DataCardValue3.Selected.'App Countings'.Site,
Warehouse : DataCardValue4.Selected.'App Countings'.Warehouse,
JournalType : DataCardValue5.Selected.'App Countings'.'Inventory Journal',
Item : GalleryProducts.Selected.Name,
Qty : 1,
Status : "Good"
})
As you can see from how to collect, I retrieved the Site information from the previous screen with directly access the DataCardValue control. 'App Countings' is the Data source name. Whilst there is no error in the code, there is no data retrieved in the collection colEntry.
As I tried to show it in a Datatable control, it give me an error saying those columns "Expected text value"
I'm guessing it is the way I retrieved the combox box from previous screen is wrong. What is the correct one ?
Thanks,
Hi @Voltes ,
There is something wrong with the collect function, please try this:
Collect(colEntry,
{ Site : DataCardValue3.Selected.TargetColumn,
Warehouse : DataCardValue4.Selected.TargetColumn,
JournalType : DataCardValue5.Selected.TargetColumn,
Item : GalleryProducts.Selected.Name,
Qty : 1,
Status : "Good"
})
The TargetColumn means the field value you want to get from lookup column.
Hope this helps
Sik