I created a form with the field, Market, that uses an @DbColumn (which looks at a view, MarketImport) within a dialog list to allow the user to select a Market . The next field is called Submarket. I have a view, SubMarketImport, with the first column being the Market and the second column listing the Submarket of that Market. For example, column 1 can contain three records with Oil and column 2 will be the submarkets of Oil.
Oil > SubOil1
Oil > SubOil2
Oil > SubOil3
I am having a tough time trying to get an @DbLookup to work properly. The Key would need to be the Market field. So within the Submarket field, I have the type as Dialog List and using Formula for choices, I have the following:
tempmkt := Market;
@DbLookup(“”:“NoCache” ; “IPCS1/Neville” : “”; “SubMarketImport”; tempmkt;2)
My thinking is that I need to pull in the value of the Market field (previous field) and save it as a temporary field and use that as the Key. Then use that value to search the SubMarketImport view and look to column 2 as the values to display in the dialog list of the Submarket field. I know that I am missing something because this is not working. Can anyone offer any guidance?
Thank you.