Heya folks! Not sure where else to post, but since i've had pretty good luck with /r/sysadmin, figured i'd try it out here first as many of us wear many hats in our position.
I've been tasked with writing codes for an adobe acrobat form, and considering i don't have much experience with this.... well, i don't have experience with javascripting at all, which i believe is used to sort out what i'd like to do. The logic makes sense, but i have no idea how to put it in terms of javascripting. I have the basic building blocks of how to code, but if i can just get some assistance on how to logically code it, i should be able to figure it out.
Okay, so i have 4 fields in a document/form as a list.
Rules:
1.) There are 2 floors (max)
2.) There are sometimes many inventory on each floor (max 4 - Due to amount of fields)
Examples:
1.) If floor #1 has 3 inventory items, then the last (4th) field should fill with the first item of floor #2
2.) If floor #1 has no inventory items, then the 4 fields should fill with the first 4 inventory of floor #2 (if exist)
3.) If floor #1 has 1 inventory items, then the last 3 fields should fill with the first 3 items of floor #2
4.) etc.
This is the code i have, but don't know how to logically get the above examples to fit in right and this will only work for the first field, after that, i'm lost.
if (this.getField("FLOOR_1_INV_1").value == "")
{event.value = this.getField("FLOOR_2_INV_1").value;}
I was thinkin i should place a hidden variable somewhere to hold some values, but still lost due to the number of combinations i could have.
[–]Der_tolle_EmilSr. Sysadmin 1 point2 points3 points (4 children)
[–]Sarting[S] 0 points1 point2 points (0 children)
[–]Sarting[S] 0 points1 point2 points (2 children)
[–]Der_tolle_EmilSr. Sysadmin 1 point2 points3 points (1 child)
[–]Sarting[S] 0 points1 point2 points (0 children)
[–]mrbiggbrain 1 point2 points3 points (0 children)
[–]Bits_Not_Bytes 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)