How to show previous data on button group?

In a mobile survey app, I am using "button group" widget to give rating for each question. Now while I am opening the app next time, I want to reflect the previous ratings on those "botton group" for each question individually and the rating can be modified further. How this scenario can be accomplished?

Hi Saikat, 

Don't know if the buttongroup is the perfect solution for this, but there are many ways to Rome of course. Behind the buttons create static values > so, button 1 has value 1 etc. This value needs to be saved in an entity under every single question. Also fetch the surveyed person and save it within the entity. Afterwards you can use the table for modifications. 

Hope this will clear things up. 

Martijn de Pijper wrote:

Hi Saikat, 

Don't know if the buttongroup is the perfect solution for this, but there are many ways to Rome of course. Behind the buttons create static values > so, button 1 has value 1 etc. This value needs to be saved in an entity under every single question. Also fetch the surveyed person and save it within the entity. Afterwards you can use the table for modifications. 

Hope this will clear things up. 

Hi Martijn,

I have set static value for each button of the button group and can save it in an entity after submitting. But there is no source behind the button group through which I can fetch the previous rating unlike form widget. That's where I'm stuck. Thank you.


SAIKAT BHATTACHARYA wrote:

Martijn de Pijper wrote:

Hi Saikat, 

Don't know if the buttongroup is the perfect solution for this, but there are many ways to Rome of course. Behind the buttons create static values > so, button 1 has value 1 etc. This value needs to be saved in an entity under every single question. Also fetch the surveyed person and save it within the entity. Afterwards you can use the table for modifications. 

Hope this will clear things up. 

Hi Martijn,

I have set static value for each button of the button group and can save it in an entity after submitting. But there is no source behind the button group through which I can fetch the previous rating unlike form widget. That's where I'm stuck. Thank you.


Hi SAIKAT,

You can create an entity as per Martijn & Update the tupple accordingly, then re-initialize the variable which hold button-group value n map to it.

Are you having more then one group, like you said "no source behind the button group",  can you elaborate you scenario !!


Thanks


assif_tiger wrote:

SAIKAT BHATTACHARYA wrote:

Martijn de Pijper wrote:

Hi Saikat, 

Don't know if the buttongroup is the perfect solution for this, but there are many ways to Rome of course. Behind the buttons create static values > so, button 1 has value 1 etc. This value needs to be saved in an entity under every single question. Also fetch the surveyed person and save it within the entity. Afterwards you can use the table for modifications. 

Hope this will clear things up. 

Hi Martijn,

I have set static value for each button of the button group and can save it in an entity after submitting. But there is no source behind the button group through which I can fetch the previous rating unlike form widget. That's where I'm stuck. Thank you.


Hi SAIKAT,

You can create an entity as per Martijn & Update the tupple accordingly, then re-initialize the variable which hold button-group value n map to it.

Are you having more then one group, like you said "no source behind the button group",  can you elaborate you scenario !!


Thanks


Hi Assif,

For example, I have 10 questions and each question is associated with a "button group". At the end of all questions, I have the submit button. I can save the ratings of all questions to an entity after clicking the submit button.

Now I am stuck with how to map those ratings with corresponding group buttons from that entity so that I can see it next time I am opening the app.

Thanks.

Hi Saikat,

So you want to see an average of the given answers in your button group? 

SAIKAT BHATTACHARYA wrote:

assif_tiger wrote:

SAIKAT BHATTACHARYA wrote:

Martijn de Pijper wrote:

Hi Saikat, 

Don't know if the buttongroup is the perfect solution for this, but there are many ways to Rome of course. Behind the buttons create static values > so, button 1 has value 1 etc. This value needs to be saved in an entity under every single question. Also fetch the surveyed person and save it within the entity. Afterwards you can use the table for modifications. 

Hope this will clear things up. 

Hi Martijn,

I have set static value for each button of the button group and can save it in an entity after submitting. But there is no source behind the button group through which I can fetch the previous rating unlike form widget. That's where I'm stuck. Thank you.


Hi SAIKAT,

You can create an entity as per Martijn & Update the tupple accordingly, then re-initialize the variable which hold button-group value n map to it.

Are you having more then one group, like you said "no source behind the button group",  can you elaborate you scenario !!


Thanks


Hi Assif,

For example, I have 10 questions and each question is associated with a "button group". At the end of all questions, I have the submit button. I can save the ratings of all questions to an entity after clicking the submit button.

Now I am stuck with how to map those ratings with corresponding group buttons from that entity so that I can see it next time I am opening the app.

Thanks.

You might be having the Question Entity, Add one more attribute to that 'QBtnAnswer' & while you set the Button group make an entry/update in Question table for that specific one.

So that next time you can fetch it back for appropriate for each particular question.



Martijn de Pijper wrote:

Hi Saikat,

So you want to see an average of the given answers in your button group? 

Hi Martijn,

The scenario is as follows :

For example, I have given 8 rating to the 1st question, 6 rating to the 2nd question, 7 rating to the 3rd question and so on and then submit it. When I open the app next time, number 8 will be highlighted for 1st question, number 6 will be highlighted for 2nd question, number 7 will be highlighted for 3rd question and so on in the respective button group. Hope this clarifies you.

Thanks.


Hi SAIKAT BHATTACHARYA,

As per your requirement, I have created a sample. Please refer attached OML.

Local Database Entity: Questions
Click ADD button to create a new question. Set question text eg: "Question 1" and set its integer value eg: "4"

Now on the home screen, its automatically create question header and button-group 1 to 10 and selected value "4" highlighted. you can change it from 1 to 10.

Hope this helps!
Thanks

Hi SAIKAT BHATTACHARYA,


I guess you want to achieve something like this... Demo Application 

If so, I can help you with the implementation :)


Kind Regards,

Benjith Sam

Benjith Sam wrote:

Hi SAIKAT BHATTACHARYA,


I guess you want to achieve something like this... Demo Application 

If so, I can help you with the implementation :)


Kind Regards,

Benjith Sam

Hi Benjith,

You are absolutely right. I want the same. Can you please guide me how to achive this?

Thanks


Solution

Hi SAIKAT BHATTACHARYA,


I'm sorry for the late response. Please find the attached application espace.

Let me know if you need any further help. 


Kind Regards,

Benjith Sam

Solution

Benjith Sam wrote:

Hi SAIKAT BHATTACHARYA,


I'm sorry for the late response. Please find the attached application espace.

Let me know if you need any further help. 


Kind Regards,

Benjith Sam

Thanks a lot Benjith.


Regards,

Saikat