Solved

How to fill a task parameter based on a cube field?

  • 26 October 2022
  • 3 replies
  • 45 views

Userlevel 3
Badge +5

Is it possible to fill a task parameter based on a cube field?
I've already done the folowwing things but the task parameters still empty. 
 

✔️ View contains invoice_id 

✔️ Task assigned to view/cube

✔️ Task parameter linked to view column [invoice_id]

Task parameter @invoice_id empty

 

Task assigned to cube

Wonder what I'm overlooking 👀

icon

Best answer by Dennis van Leeuwen 27 October 2022, 08:51

View original

This topic has been closed for comments

3 replies

Userlevel 4
Badge +1

Hey Dennis,

Could be me but it seems like the invoice_id in your cube is empty? If it is empty in the cubei tself it will also be empty in the task pop-up. But I can't say with 100% certainty because your task pop-up overlaps the cube values a little bit.

Perhaps a silly question but have you checked whether the view is actually returning a value for the invoice_id? 😅

Userlevel 3
Badge +5

Hi Renée, 

Thanks for sharing your thoughts.

It indeed looks on the image that the invoice_id is empty, however this is not the case. This is because the cube fields are not expanded. 

[invoice_id] not empty

After upgrading yesterday I was helped in the right direction by the SF by the following validation message/solution. 

✔️ Solution | Add all the PK fields as cube fields ...
PK | exact_debtor_outstanding_id

Adding the PK, in our case exact_debtor_outstanding_id as a cube field seems to be the solution. However, I do not understand the full logic, perhaps there is a technical reason for this? 

 

Userlevel 4
Badge +1

Hey Dennis,

The reason for this is mostly what is already written in the Consequence value of the validation: “Because the cube does not have all PK fields as cube fields, the task or report parameters cannot be correctly filled".

Since the task is connected to the cube itself it is required to know the full PK in order to select from the underlying view that the cube is based on, thus making it possible to pass on the correct parameter(s) to the task. When you leave one or more of the PK values out from the cube, it will not be possible for the GUI to select the appropriate record because the full PK is not known.

I hope this explanation clarifies things a bit, and it’s good to see that the validation helped you find the issue and resolve it! That means that our validations are doing what they are supposed to do 😄

If you have any suggestions on how we could possibly improve the text of the validation to make things a bit more clear for the developers using the Software Factory, please let me know and I can suggest it with the team 😀