Copy link to clipboard
Copied
I need some assistance on a Travel Expense form that I have created in Adobe X.
The form has a drop-down box from which our consultants must select the “purpose” of their trip. The choices are: Prospecting, Initial Presentation, 2nd IP, Campaign Design, Team Meeting, and several others. The second section of the form contains rows and columns. The rows are the date(s) of travel and the columns are by expense type (airfare expense, meals expense, parking expense, and several other categories). They can enter several days’ (rows) worth of expenses for each column heading (airfare, parking, etc.) and the amounts are totaled up in section at the bottom of the form for “accounting”. Each row in the accounting section contains several columns such as: account number information (each account number means either "airfare", "parking", "hotel", etc.), an “amount” field which totals up all entries for that expense type, and a “trip” field which is populated from the selection made in drop-down field. Everything to this point works beautifully, however, there is an enhancement I would like to make to the form and I’ve tried, and tried to work it out on my own with no success.
What I need the form to do is when the consultant selects the purpose of trip as either Prospecting, Initial Presentation, or 2nd IP. Then for those selection only, I don’t want to have separate entries in the accounting section for each expense type (airfare, hotel, parking, etc.) For only those three trip selections, I want all travel expenses to be totaled in a special account number field, let’s call it, “Sales Calls”. So the amount field would be an addition of all airfare, hotel, parking, meals, etc. expenses entered in the second section. But, the form would also still have to "split" the specific expenses out for all other types of trip purposes selected in the drop-down field, as I outlined in the first full paragraph above.
I’ve tried to figure out how to do this using show/hide fields “if” selecting Prospecting, Initial Presentation (hide all amount numbers except the one for “Sales Calls” else show ‘all the other amount fields”) I’ve tried conditional calculations and I can’t make it work. Since my drop-down box already has a custom keystroke with arrays, indexes etc. if some additional script needs to go there, I have no idea as to where to place it within what I already have or how to write it. Does some script need to go in the other fields, such as the “amount” fields? If so, is it a calculation script, validation script, or what?
I know very little about Javascript and everything I’ve been able to do so far is because I’ve found the answers online and been able to figure out and adapt. But I can't quite find this one. So, I need very, very explicit instructions. Or something really simple. Hope this makes sense and that somebody can help. Sorry for the long post - but it's kind of a complicated situation. Thanks for any help anyone can provide.
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now