2
$\begingroup$
data = Dataset[{<|"userId" -> 5311, 
"Rec" -> 
 "You need to improve in Free Response Question type"|>,<|"userId" -> 5312, 
"Rec" -> 
 "You need to improve in Write Code Question type"|>, <|"userId"-> 5313, 
"Rec" -> 
 "You have a great performance in all question types"|>,<|"userId" -> 5314, 
"Rec" -> 
 "You need to improve in Multiple Choice Question type"|>}]

Is there a way to create a manipulate such that the control shows the userId and as I move the control, I see the text corresponding to each userId. Something similar to this:

Manipulate[Grid[{{userId}, {"text"}}, BaseStyle -> {FontFamily -> "Roboto"}], {{userId, 1}, 1, 5}]
$\endgroup$

2 Answers 2

1
$\begingroup$

Code below is not very efficient, but maybe it does what you want.
Manipulate[Grid[{{data[[Position[data, k][[1, 1]], "userId"]]}, {data[[Position[data, k][[1, 1]], "Rec"]]}},BaseStyle -> {FontFamily -> "Roboto"}], {{k, Normal[data[[All, "userId"]][1]], "userID"}, Normal[data[[All, "userId"]]], ControlType -> RadioButton}]

With your Dataset named data and a RadioButton control this code yields:
enter image description here

$\endgroup$
1
$\begingroup$

Here is one way:

Manipulate[
  data[SelectFirst[#userId == userId&]]
, {userId, data[All, "userId"] // Normal, Slider}
, ContentSize -> Full
]

manipulate

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.