Issue with formula based attributes in data interactive plugin API

CODAP Forums CODAP Help Forum Issue with formula based attributes in data interactive plugin API

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6430 Score: 1
    Jason Chen
    Participant
    5 pts

    Hi! My team is building a CODAP plugin and we’re trying to read data from CODAP through the data interactive API. Specifically, we’re using item search to get all the data items from a context, but this doesn’t seem to work well for hierarchical data where the parent collection has a computed attribute (via a formula). When searching on such a data set, most of the returned data items have empty values for the computed attribute. Is this behavior intended?

    Here our plugin just copies all the data items from the table on the top and inserts them into a new data context. As you can see, only one data item per parent case has a non-empty value for the computed attribute “Boundaries”.

    #6431

    I want to go further and argue this is a bug. The data in the places table are associated with all of their corresponding entries in people. This is the meaningful semantics for the upper display. So when the tables are expanded (basically a join), the data should be “replicated” into codapflow_1.

    #6434
    Jonathan Sandoe
    Keymaster

    I agree this is a bug.

    I have logged the bug. You can follow its progress here: https://www.pivotaltracker.com/story/show/178132550

    In the mean time, if I understand what you are trying to do, a simple remedy is to copy the formula when you create the replicated attribute. This will regenerate the values in the new dataset.

    #6435

    Thanks!

    Correct, that would indeed be a remedy, and we discussed this. However, we are not yet convinced whether we should always copy the value or the formula, and indeed we think there might be situations when either might be called for. The latter would, as you note, mask the bug, while the fix would take care of the former scenario.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CODAP Help Forum’ is closed to new topics and replies.