-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data property on Sequence is a List<object> #100
Comments
Morning @ncipollina - All APLValue objects should be able to be represented as strings using the I'm at work so I can't check the exact code right now, but if you take a look it should be something like Let me know if that helps? |
@stoiveyp thanks for the reply. I tried that and it ended up outputting this: {
"type": "Sequence",
"id": "leaderboardSequence",
"width": "100%",
"height": "80%",
"data": ["${payload.leaderboardData.properties.listItems}"],
"numbered": true,
"items": [ That theoretically should have worked, but it just generated an error. |
hmm it shouldn't have put it in the array, it should have referenced the string directly. |
Sure. It was like this: Data = new List<object>{ "${payload.leaderboardData.properties.listItems}" }; |
That's great, thank you. As I can't get to it for hours yet (it's 1pm here and I won't be free until 9/10pm earliest) could you try the following line of code as an alternative and see if this changes the output at all?
Just want to see if that produces something more useable - if not then I'll debug when I'm available tonight 👍 |
I'll give it a try. Thanks! |
Ok, that did the trick! I'll close this issue. |
Currently, the
Sequence
component has theData
property defined asAPLValue<List<object>>
. This will work great when I want to provide the data as a list of objects. But for the scenario where I want to reference a datasource because I'm using a transformer, this won't work because I need to be able to provide a string. Something like this:Ideally it would be nice to be able to support both a list of objects and a string so I can define this either way.
The text was updated successfully, but these errors were encountered: