Smartform List view check


Badge +2

Hi all,


First question


I'm wondering what is the condition to check when a row is added and if it exceed a X amount and a view will show. In another word, in the list if the any or the row exceeded a X amount, the hidden view will then show.


 


Second question


View need to have at least 3 attachment before the form can be submitted. Is there such a validation?


11 replies

Badge +5

First question:


If you find the rule that executes the "apply changes to made to the row" and tag the advanced condition rule in the same spot, you should be fine.


 


Second question:


Sure use the Count Aggregation.  Then set a rule on that data label. 


When a control is changed


 If count > 2 then


Show a view


Else


Hide a view


If you need more detail let me know, I'd be happy to help.


-Brian

Badge +2

First Question:


I'm a bit confuse when it come to editable list view. Which control should I use to validate? the Display Row(s) or the control under Add/Edit Row? Anyway just to provide a more understandable situation, the amount is populated when the dropdown list transfer the data over. And when the amount exceeded the X amount, the hidden view will then show.


 


Second Question:


Solved! Thanks!

Badge +5

click the col in editable list view.  Look at the bottom right of the screen.  You will see a properties box.  Name, Text, Field etc.  Look at the very bottom and you will see that "Body" is selected.  To the left of that is Header, then Column.  Click Column.


At the bottom you will see Aggregation.  Click the word Add next to count.  It will add "Count Label" which just says count.  It will also add a data lablel that will be the number zero.  Click the zero.  It should be named "Count Data Label".  I'd re-name it something that you can find easily like dlCountToThree.  Then click the rules tab in the bottom right of the screen.  Add the rule I mentioned before.


HTH- Let me know.


 

Badge +5

LOL.  Ok I answered the wrong one.


 

Badge +5

When you create an editable list, by defualt there will be a rule for


 When the View executed List item added
    then apply the changes made to the row on the editable list
    then execute the Create for all the items that have been Added (configure)


This is where you want your if Statement.


Depending on how fancy you have gotten, the rule might be somewhere else, but for an editable list to work you have to have the "apply the changes made to the row on the editable list" action kicking arroud somewhere.  Wherever you have that is where you want your If/else statement.  You will probably end up using:
  If an Advanced Condition is true
    Show a view
  Else
    Hide a view

Badge +2

I have found the "apply the changes made to the row on the editable list" and embed the If/else condition to it. However, the condition in my case, the view will only show when the list of record that have exceed the X amount is being selected else the view  will not be shown. Which is wrong in my situation. 


And by the way, which control should i be using to validate? The control from the "Display Row(s)" or "Add/Edit Row" or from the smart object column?

Badge +5

>>else the view  will not be shown. Which is wrong in my situation


What do you need to have happen?  If it is something along the lines of "once the hidden view is shown don't hide it any more" just change the else statement.


>>which control should i be using to validate? The control from the "Display Row(s)" or "Add/Edit Row" or from the smart object column?


I don't understand what this refers to.

Badge +2

My condition should be if the column for the list contain a figure of exceeding a X amount the view will then show.


During the advanced condition, a check needs to done. In the smart form of a list view, control are available for "Display Row(s)" or "Add/Edit Row" at left panel of the conditions setting. I'm not sure which field to use to check for the condition. 

Badge +5

>> I'm not sure which field to use to check for the condition.


Gotcha.  I've never sat and figured out when one works and when the other doesn't.  I have a bit of trial and error on that aspect myself. 
However, I'll tell you that 9 out of 10 times (when working with list views) the smart object works.*

>>My condition should be if the column for the list contain a figure of exceeding a X amount the view will then show


OK.  So your view initalize rule probably has a get list method.  You need the "Advanced condition" -> show view there.  That way if it is true when the list first loads, the view will show. 
You also need it on the same rule with "apply changes to the row" that you have it now.  Delete the Else statement that hides the view and you should have it...?


*Essentially I use the Smartobject for everything with lists.  The only time I use the Add/Edit Row control is when I have a sub-view that is adding data to an editable list row. I have no idea what the "correct" way of doing it is, but that is what I've settled into.


 

Badge +2

Thanks!! Manage to get it work, apply the advanced condition in the Dropdownlist changes.


I'm still trying to understand the different usage for the  Add/Edit Row control and Display Row(s), having issue to hide the view the column does not consist of the X amount. Any suggestion on these?

Badge +5

I'm at a wall.  Without seeing it, I'm not sure what you are stuck at.  If you want, shoot me an email, we can schedule a quick Join.me session and I'd be happy to take a look.


bwillner@seacorp.com


 


 

Reply