Copy link to clipboard
Copied
Hi Community, I am facing a big issue with Adobe Acrobat. I want to merge 2 MS Excel taps with the same functionality.
I have 5 columns 1. Item no. 2. Description 3. Unit cost 4. Qty 5. Total
I need just the first 3 columns' funtionalites.
If I select the "item no.'' from the dropdown column then automatically shows a ''description'' column text (this column should not be another dropdown just 1 line text column) and another column has a unit cost.
Please check my attachment. WHOLE ADOBE ACROBAT MUST BE MOBILE-FRIENDLY. Thanks
Copy link to clipboard
Copied
I have successfully easily entered item no. on the drop-down menu but I am still facing the issue of not showing the description and prices. Please check 2 attachment of screenshot
I am adding a simple fillable box in the description and unit cost. do I need also a dropdown menu in the description and unit cost?
I am going to item no. property and go to 'Custom calculation script' and add the below script
var cData = [
{item: "Item1", desc: "Description1", cost: 100},
{item: "Item2", desc: "Description2", cost: 120},
{item: "Item3", desc: "Description3", cost: 150}];
if(event.value !== "Select item"){
for(var i=0; i<cData.length; i++){
if(event.value == cData[i].item){
this.getField("description").value = cData[i].desc;
this.getField("Unit Cost").value = cData[i].cost;
break;}}}
else {
this.getField("description").value = "";
this.getField("Unit Cost").value = "";}
Copy link to clipboard
Copied
Hi Community, I am facing a big issue with Adobe Acrobat. I want to merge 2 MS Excel taps with the same functionality.
I have 5 columns 1. Item no. 2. Description 3. Unit cost 4. Qty 5. Total
I need just the first 3 columns' funtionalites.
If I select the "item no.'' from the dropdown column then automatically shows a ''description'' column text (this column should not be another dropdown just 1 line text column) and another column has a unit cost.
Please check my attachment. WHOLE ADOBE ACROBAT MUST BE MOBILE-FRIENDLY. Thanks
Copy link to clipboard
Copied
You need script to do that, and script won't work on mobile devices.
Copy link to clipboard
Copied
what is any method where my client easily see this form on a mobile device? thanks
Copy link to clipboard
Copied
It won't work on mobile devices.
Copy link to clipboard
Copied
Okay what is script for desktop computer. Thanks
Copy link to clipboard
Copied
What are the descriptions and costs? What are field names and how many rows you have?
Copy link to clipboard
Copied
Hi Nesa Nurani!
Please check my attachment. My 1st field name ''items no.'' has almost 200 items this field should be a dropdown menu. Please give me a simple method where I can add easily 200 items to the dropdown menu. 2nd field name is the ''description'' and 3rd field name is ''Unit Cost''. Every item is related to the description and unit cost. Another field name is ''Quantity'' and ''Total Cost'' but these 2 columns are not necessarily scripts. I need ''Item No'' (the dropdown menu that has 200 Products/items), ''Description'', and ''Unit Cost'' scripts. Please help me. Thanks
Copy link to clipboard
Copied
To populate lots of items in a dropdown, you can use script for that, you can run script from console or a button to populate a dropdown with items:
var dropdown = this.getField("items no.");
var cList = ["Select item","Item1","Item2","Item3"];//...continue adding all items here
dropdown.setItems(cList);
Then you can use this script as 'Custom calculation script' of that dropdown field to get description and cost to "description" and "Unit Cost" fields when you select item from dropdown:
//here write items and descriptions/cost for each item
var cData = [
{item: "Item1", desc: "Description1", cost: 100},
{item: "Item2", desc: "Description2", cost: 120},
{item: "Item3", desc: "Description3", cost: 150}];
//this part you don't need to change
if(event.value !== "Select item"){
for(var i=0; i<cData.length; i++){
if(event.value == cData[i].item){
this.getField("description").value = cData[i].desc;
this.getField("Unit Cost").value = cData[i].cost;
break;}}}
else {
this.getField("description").value = "";
this.getField("Unit Cost").value = "";}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Why did you remove quotes?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Why do you use quotes at the name of the dropdown?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Share your file.
Copy link to clipboard
Copied
I have successfully easily entered item no. on the drop-down menu but I am still facing the issue of not showing the description and prices. Please check 2 attachment of screenshot
I am adding a simple fillable box in the description and unit cost. do I need also a dropdown menu in the description and unit cost?
I am going to item no. property and go to 'Custom calculation script' and add the below script
var cData = [
{item: "Item1", desc: "Description1", cost: 100},
{item: "Item2", desc: "Description2", cost: 120},
{item: "Item3", desc: "Description3", cost: 150}];
if(event.value !== "Select item"){
for(var i=0; i<cData.length; i++){
if(event.value == cData[i].item){
this.getField("description").value = cData[i].desc;
this.getField("Unit Cost").value = cData[i].cost;
break;}}}
else {
this.getField("description").value = "";
this.getField("Unit Cost").value = "";}
Copy link to clipboard
Copied
thank you so much if you can solve this problem. please check my attachment. this if my file need to work. thanks
Copy link to clipboard
Copied
Your field name is "Description" not "description" like you wrote in your first post.
You are not following my instruction, I told you to run set items script from a button or a console, so remove that script from keystroke, and don't use script in both validate and calculate.
Here is the corrected file:
https://drive.google.com/file/d/1PYcZ8H9LsocZalPHpSAHHsSJ8tEJmCVJ/view?usp=sharing
Copy link to clipboard
Copied
Would this work for your situation?
https://www.try67.com/tool/acrobat-populate-fields-from-dropdown