This topic contains 4 replies, has 0 voices, and was last updated by Anonymous 11 years, 1 month ago.
- February 18, 2010 at 3:33 pm #415
I have a table that I am using to give users the ability attach to any number of attachments to a form. The table has an attachment column and a button colomn(delete button). To make life easier for the user I have added a behavior when my attachment page is opened. It has a simple branch with an advanced condition as such:
Count(List: tblAttachments – Delete Button Column – All Rows) < 1
Everytime I open the page a row is added, instead of stopping at the first one. So I added a field to the page and before the branch counts the number of rows, i added a set property action with a formula also using Count(List: tblAttachments – Delete Button Column – All Rows). Everytime that page is loaded that field is still set to 0, so its almost like the count function is broken? Not sure whats going on here.February 18, 2010 at 3:49 pm #5071
Hmm looks like Count doesnt count the row if you are pointing it to a button field or an attachment field with nothing attached. I added a hidden “index” text field column that has a default text value and set the action to count that index column and its working correctly now..weird.February 18, 2010 at 3:51 pm #5072
Please raise such things in the support ticket where you can upload your form so we can see what you are actually doingn would need to see what you are doing and a full explanation of what the intent is, but perhaps look at running your form in DEBUG mode to see what the scripts are doing may help you in the first instancee
Having said that what is it that you are trying to do to ‘make life easier’ for your user ?
Maybe all you need to do on the ‘page is opened’ is to use the SetTableRow behaviour with the ‘add row’ option if you want to give them an ‘active’ row to attach to, and if you want is for them to delete a specific row just use the SetTableRow ‘delete current row’ option so they can click the button to delete that rowFebruary 18, 2010 at 4:07 pm #5073
I dont think this really needs a screenshot. Create a table on a page with two columns: a button column and an attachment column. Then add multiple rows to the table. Now run a behavior that counts the number of rows. If you haven’t attached anything it does not count the rows whether you are counting by the button column or the attachment column.February 18, 2010 at 4:40 pm #5074
your second post (when you mentioned adding in the hidden text column) was posted as the reply was being composed.. so didn’t see that…( common thing in forums.. hence my preference in using the support ticker)
but what you’ve done and seen is expected.. the ‘count’ would need something to actually count in terms of data entry. Buttons and attachments are special fields so wont’ count
You must be logged in to reply to this topic.