So, thanks to @Jeff_Hager and @ThinhDinh, I have moved forward on my application.
I have created a form that contains,
a. A dropdown with 2 options.
b. Radio buttons that dynamically appear on the basis of the selection in the dropdown
c. A text message - Think of it as a result or answer, depending on the options chosen in the dropdown AND the radio buttons.
I have several doubts here.
- There is a Submit button at the bottom of the form by default. Pressing this button saves the data to a table. However, the data is saved in a random row, most often in the 6th/7th row. Is there are a reason for this? Can this be changed?
- I have used the viewability option to dynamically load radio buttons from a table on the basis of the option chosen in the drop down. This works without âSubmittingâ the form. See below,
The five radio buttons above are linked to the âResidentâ Option. When I select the first option, the message âYour income is taxable in Indiaâ is displayed. This is based on a Visibility condition that I have applied to the text.
The visibility conditions that I have used for this text are as follows,
This works fine. Note here that the Visibility Conditions draw data from the Column called Resident_Second Level_W. However, the column is empty since I have not pressed the âSubmitâ button in the form. I am not sure from where the status of the radio button is being picked from, but yes, the dynamic text works.
The problem arises when the second item in the drop-down is selected.
The text âYour Income is taxable in Indiaâ should ideally be appearing above the Submit button just like the earlier text message. The same column is being referred to. However, the text that is shown is âYour income is not taxable in Indiaâ. This is was actually the result of the selection of "Resident"in the drop down and a radio button that followed, just a few secnod back when I was testing the options. This text hasnât vanished and continued to remain even when a different option in the drop down is selected.
I have tried to solve this issue by using an AND condition to the content of the dropdown but I have noticed that we cannot have an AND and an OR conditions for a single component. It is either AND or OR. Not both.
Looking forward to some suggestions.
Thank you in advance.
I havenât fully followed your case. From a quick glance, I noticed that you didnât include visibility settings for the text message component based on the dropdown selection (First_Level) of whether it is resident or non-resident. It would be better to use an âandâ relationship and add it to the second level options. Example: First_Level is Resident/non-Resident and second_Level is not empty and second_Level is (or is not) âNone of the above are correctâ.
Native Forms and Form Containers are designed to Add Rows by their nature. They will always have a submit button, and a new row will always be written to the end of whichever table the form is set to write to.
Iâm not sure what you mean by a random row. Like I said, a form will always natively at a row to the end of the table you have chosen as the destination for the form.
Form data lives in a temporary state. The values exist in memory, but have not been written to a table yet, so even though you donât see values written to the table yet, imagine that they are, but the submit button just commits them.
Iâm kind of surprised that you didnât see both taxibil and non-taxible message, but maybe I overlooked something in your screenshots. Yes, IF condition functionality is severely lacking in my opinion, but Iâve been complaining about it for a long time with no improvements.
In any case, I think I would restructure your choices a bit. Your visibility conditions end up being very verbose and prone to issues if you change the wording even a little bit. I think your first level choice component is fine and can write Resident or Non-Resident. For your second level choice components, I would consider merging then into one, and then add a filter to filter the values based on the screen value of the first level choice. This first step will help eliminate a lot of your issues. Then, I would probably change the second level choice to write a coded value instead of the full description. For example, maybe it writes 001-R-T, 002-R-NT or 001-NR-T, 002-NR-NT. That alone will give you enough information to know if the value is Resident, Non-Resident, Taxable or Non-TaxableâŚall in that simple code. That way you only need two text components. One that checks if the choice contains â-Tâ for taxable and one that checks if the choice contains â-NTâ for non-taxable. You could enhance it with 4 text components like you have and add AND conditions that check if the value of the first level choice is Resident AND the second level choice code contains â-Râ AND the second level choice code contains â-Tâ example. The benefit of doing all of that is that everything becomes data driven. You set it up once and if you want to add, remove, change and choice options, you can in the data table without having to reconfigure any visibility conditions.
4 Likes
Dear @Jeff_Hager thank you for the suggestion.
I understand replacing the verbose data with simpler structures. But I am not sure how this will solve the problem. Iâve tried implementing your suggestion.
- Merge the Second Level into one column - Done
- Use a filter - I have created a new column to assign values to the Secnod Level entries. âBothâ is for those entries that should appear for both the selections in the drop down and âResidentâ for that entry which should appear only when the option "Resident"is selected in the drop down.
I have introduced two filters, One to check for entries which have been tagged to âBothâ and another to check for entries tagged to the value selected in the drop-down.
Result: Wonât Work.
The filter condition Second Level Category is First Level_W doesnât work. This is linked to your earlier clarification about how data is stored in a temporary state and is not submitted to the table. Even when Submit button is not clicked, First Level_W is not empty works absolutely fine in the Visibility options. However, When I use the same First Level_W in the Filter to check if I have âResidentâ in the Second Level Category, it doesnât work. This maybe because, in the temporary state, the variable âResidentâ is stored in some other form (hex, binary, etc.?). So âis not emptyâ works but not an exact match with the word âResidentâ. I am not sure.
If it worked, all 4 entries in the Second Level column should have appeared. However, only 3 appear when âResidentâ is chosen. By logic though, the list of radio buttons appearing when âNon Residentâ is chosen is correct because, the second filter condition works absolutely fine (Second Level Category = âBothâ).
Have I undestood your suggestion correctly?
Need guidance once more!
THanks in Advance!
Is your filter using Screen Values?
1 Like
No. It doesnât at the moment.
Should it?
If yes, Iâll review a bit about it and try to implement.
Yes, because you are trying to filter based on the selected value on the form screen. Not by a value that comes from the table.
2 Likes
Thank you @Jeff_Hager
Am I doing this right? It appears to be wrong since no option appears in the radio buttons.
Second Level Category contains the tags âResidentâ and âNon Residentâ to match the option chosen in the drop down.
First Level is chosen within the Screen option to compare the rows in Second Level Category with the option chosen.
There are three rows that contain the Resident tag. However, none appear. I have tried both the âisâ and the âis included inâ options. Neither works.
Can you show what your table currently looks like? Also show the components panel on the left side.
1 Like
Here is the database
And here are the Component details
Had to recreate your setup to see whatâs wrong and I thing itâs something that your screenshots are not completely showing. Your filter is wrong for a couple of reasons.
- First, you are checking if the the list of second choice categories is included in the first choice. All of them are included if your first choice is Non Resident, which contains both non resident categories as well as resident categories. Just change it to âisâ since you are looking for identical matches instead of partial matches.
- Second, and most importantly, your filter is looking at the screen value of âFirst Levelâ. You are not filling âFirst Levelâ. You are filling âFirst Level_Wâ, so thatâs the one you should be filtering against. Couldnât tell that from the screenshots because they donât show the entire name of the column that was selected in the filter.
3 Likes
@Jeff_Hager
Thank you for taking out the time for clarifying my doubts.
It worked!
I am placing screenshots of the table and the filter to help you understand what I did here. For options which should appear under both *Resident * and Non Resident, I have entered the code Both in the Second Level Category column. For the value that should appear only when Resident is selected, I have entered the code as âResidentâ.
In the filter, I have used to check against the Screenvalue of the first dropdown OR the value in the column.
While it works, I wanted to know if we can make this more efficient.
Thank you nonetheless.
There are two ideas in mind,
- I recall your reference to writing codes to the table instead of full descriptions,
For example, maybe it writes 001-R-T, 002-R-NT or 001-NR-T, 002-NR-NT. That alone will give you enough information to know if the value is Resident, Non-Resident, Taxable or Non-TaxableâŚall in that simple code. That way you only need two text components. One that checks if the choice contains â-Tâ for taxable and one that checks if the choice contains â-NTâ for non-taxable.
This, in my opinion is more efficient that marking specific entries as Both or Resident, which is not scalable really, when the number of options blows out into large numbers.
I wanted to understand if codes can be written to the table without using the Submit button so that the codes can be used in filters.
- The Submit button is still an eyesore. It has no functionality and is a distraction to the user. Is there a way to remove the visibility of the Submit button? Or, in my case, where text message results are instant, what functionality can the Submit button serve?