Solved

Cannot see values in a virtualised collection

I have a 1:M from process entity to a collection. I have an external sql query view where I mapped certain fields to my virtualised collection entity. I mapped a Business Key in the collection called ResultID to the views index field called FKID. I want the records for the case to be displayed in the collection in a table on the form. However no values are displayed. I feel that somehow I need a FK in the view or in the virtualised collection, so that bizagi knows which 1 or many records are related to a specific case. I do have a CPReference on the process entity and in the view (character type) which could act as a relationship but not sure how or where to set this up. Please advise.

The Provider Test did work. The collection values display in Expert View, but are not showing on specific form for specific case during testing.

Comments (18)

photo
1

Tried a jpg and a png, shows it uploads but then does not show as attached !?

Process Entity = ExternalWayleaveApplicat has (1:M) relationship (called EWApplication) to EWSpatialResults Entity (inbetween entity) which then has a FK (called ResultsTable) to the related entity, which is the virtualised table EWAnalysisResults.

photo
1

If I use filter 'EWCaseNo = 303' then I dont get the error, just XPaths highlighted in green when I validate.

If I use the following then I get the validation error, but it does work and filters the table on my form:

var parameters = new FilterParameters();

parameters.AddParameter("@EWCase", Me.Case.CaseNumber);

var EWResults = Me.getXPath("entity-list('EWAnalysisResults','EWCaseNo = @EWCase')",parameters);

for(var i=0; i < EWResults.size(); i++)

{

var xSpatialAnalysisResult = Me.newCollectionItem("ExternalWayleaveApplicat.EWApplication");

xSpatialAnalysisResult.setXPath("ResultsTable",EWResults.get(i).getXPath("Id"));

}

I added the CHelper.usingXPath("EWAnalysisResults", "EWCaseNo") and now it deploys correctly to Test and seems to work. The form displayed is filtered correctly.

I am happy that it works, but worried about the validation error maybe causing issues down the line, like when go to Production!?

photo
1

Good afternoon J Thompson,

I'm glad the business rule is working properly.

Greetings