Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Remote Field

Avatar

Former Community Member
Hi,

I do not know if I´m on the right forum, if no please tell me.



I´m new around Live Cycle, but I need to do the following:



I´m able to make a lot of field, and program that ones.

The problems is that for example I need to type my name in 3 fields.

Is it possible to type my name in just 1 field, the 2 other fields fill automaticaly??

How to do it??



Thank´s for any advice.



Gustavo.
5 Replies

Avatar

Former Community Member
One way you can do this I believe is using scripting language, either formcalc or javascript in the xdp. I am assuming you want to do this interactively, so a user is typing in data real time. You could do something like this (Syntax might be incorrect, but this is the jist of it).



Language: FormCalc, Run At: Client

Subform1.name1:Change

----------------------------

Subform1.name2 = Subform1.name1;

Subform1.name3 = Subform1.name1;

Avatar

Former Community Member
Hi Cory...

How are you??



I´m trying to do that but I did not get sucess...



Could you explain using more details??



Let´s try to explain again



One field must be a drop down menu and another a text or decimal field (kinds could be changed).

For example: I´ve linked the drop down field with the "service" field in the table ODBC database.

The decimal field is binded with the "price" field in the ODBC database.



So, in the drop down field I have the choices: Colorization / Photograph / so forth.......... in the decimal field I have 110 / 30 and so forth



I´d like to choose colorization in the drop down and the decimal field automaticaly updates. It´s like doing a search on my database and display the price based on the service I select.



How do I program it?? I have no ideia... All of it is new for me..



Could you help me please??

Avatar

Level 9
Similar to what Cory suggested, but with some logic.

Language: JavaScript, Run At: Client

Subform1.dropdown1:Exit

----------------------------

if (this.rawValue == "Colorization")

priceTextField.rawValue = "9.95";

else if (this.rawValue == "Photograph")

priceTextField.rawValue = "79.95"

// etc.



Please post these questions in LiveCycle Designer forum.

Howard

http://www.avoka.com

Avatar

Former Community Member
Hi Howard,



I´m sorry for posting in a wrong forum. Let me just finish solving this problem even here.



I think you did not understand. Let´s try explaining my problem again.



I´ve created an database using Microsoft Acess (database.mdb)



That drop down and decimal field are linked with that database (one for each column of my table).



I´ve already linked that fields with the column of my source table.



So colorization and photograph as well as 110 dollars and 30 dollars are registered in the database.



For example: I need to choose colorization in the drop down field, automaticaly the decimal field fits proportionaly to display the price.



I think behing all of that is when I choose colorization in the drop down menu, LiveCycle acess my databese and put the price in the decimal field according what I´ve registered in the database.



Thank´s again Howard.

Sorry for the wrong forum.

Avatar

Level 9
Hi Gustavo

I think you'll have to repost on the right forum. We don't ever do any work directly with databases, we always go via web services, so I don't know how to do this.

Sorry...

You can see an example of how to do something like this (using web services) here:



http://www.avoka.com/apps/checkcookie?location=/resources/resources/PopulatingaDropDownListusingSQLP...



It might be similar code working directly with the database.

Howard