Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Raghu  
#1 Posted : Saturday, February 17, 2018 12:13:29 AM(UTC)
Raghu

Rank: Newbie

Groups: Registered
Joined: 2/16/2018(UTC)
Posts: 3
United States
Location: Los Angeles

Thanks: 1 times
Hi There,
We have requirement to create mobile form for doing inspection in this case, we have three cascading combo box.
1. on select of the first combo item, second combo list needs to be filled (based on the value selected in 1st combo box),
2. on selecting the 2nd combo box value we need fill the list for the 3rd combo box
3. based on 3rd combo selection we need fill table with multiple rows with Radio Button and Comment area.

Can we able to do this using MobileTogether

Thanks,
Raghu
AFC  
#2 Posted : Monday, February 19, 2018 11:06:31 AM(UTC)
AFC

Rank: Administration

Groups: Registered, Administrators
Joined: 9/15/2014(UTC)
Posts: 53
Austria

Was thanked: 8 time(s) in 8 post(s)
Hi Raghu

As for other controls, you can also define "OnFinishEditing" actions for combo boxes.
Just right click the combo box and use "Control Actions for OnFinishEditing...", also see Control Events.

Once a combobox value is changed, you can e.g. reload trees or modify other data, which will change the entries of the other combo boxes.

Best regards,
AFC
Raghu  
#3 Posted : Monday, February 19, 2018 9:02:47 PM(UTC)
Raghu

Rank: Newbie

Groups: Registered
Joined: 2/16/2018(UTC)
Posts: 3
United States
Location: Los Angeles

Thanks: 1 times
Thank you for the reply
I looked at it before posting, but not able to reference the one combo box control to other combo box control I have to pass the value selected from the 1st comobo box to the Query that will get the values for the 2nd combo box (I can't bring all the values for all 3 combo box in the begining becuase list size), if you have sample code please share it.

Thanks,
Raghu
AFC  
#4 Posted : Tuesday, February 20, 2018 2:17:58 PM(UTC)
AFC

Rank: Administration

Groups: Registered, Administrators
Joined: 9/15/2014(UTC)
Posts: 53
Austria

Was thanked: 8 time(s) in 8 post(s)
Hi Raghu!

There are different approaches possible and which one is the best also depends on your specific use case, e.g. if you know the possible combo box values at design time or must load them from extern at runtime.

We have made a small sample which shows two different approaches.

$XML1 fills the values for the second combox; $XML2 is for the third combo.
The current combobox selections are saved below "$PERSISTENT/Root" (in "group", "subgroup",..).

If the first combo box changes, $XML1 is reloaded with new values from a different file and the second box is automatically loaded with these new values.
In the attached sample this file reload is done on the server and thus could be time consuming, but you mentioned a big amount of data, so this could be an option for you.

If the second combo changes, $XML2 is repopulated locally on the client by using XQuery to create (and calculate) possible values.

Another possibility (not shown in the sample) would be to use XPathes like shown below to specify different sequences of combobox values:
if ( $PERSISTENT/Root/@subgroup = "1" ) then ( "a", "b", "c" ) else ( "A", "B", "C" )

Hope this gives some ideas,
AFC
File Attachment(s):
MultipleComboBoxes.rar (2kb) downloaded 14 time(s).
thanks 1 user thanked AFC for this useful post.
Raghu on 2/22/2018(UTC)
Raghu  
#5 Posted : Thursday, February 22, 2018 6:44:39 PM(UTC)
Raghu

Rank: Newbie

Groups: Registered
Joined: 2/16/2018(UTC)
Posts: 3
United States
Location: Los Angeles

Thanks: 1 times
Thank you for the sample code I will go through this
Raghu
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.