cancel
Showing results for 
Search instead for 
Did you mean: 

what is Dynamic field ?

NewStudent
Level 4
Hi Team,

Can anyone tell me what is dynamic field and why is it used 

Regards,
A

------------------------------
Aarthy A
------------------------------
1 BEST ANSWER

Helpful Answers

bruce.liu
Staff
Staff
Hi Aarthy,

Dynamic field involves the use of a data item, which can then be plugged into an element attribute to dynamically work out the attribute value based on the value of the data item. A couple of the common usage examples may look like below:

1. Providing all other attributes are the same for cells in a table, one may substitute the data item used by dynamic attribute to move from one cell to another, providing such attributes provide reference to cell index.
2. Path attribute used by an HTML element. If the path attribute value tends to change due to change of high level DOM, it may not be useable by elements. Using dynamic attribute may compensate such change to ensure the path is still relevant.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

View answer in original post

11 REPLIES 11

bruce.liu
Staff
Staff
Hi Aarthy,

Dynamic field involves the use of a data item, which can then be plugged into an element attribute to dynamically work out the attribute value based on the value of the data item. A couple of the common usage examples may look like below:

1. Providing all other attributes are the same for cells in a table, one may substitute the data item used by dynamic attribute to move from one cell to another, providing such attributes provide reference to cell index.
2. Path attribute used by an HTML element. If the path attribute value tends to change due to change of high level DOM, it may not be useable by elements. Using dynamic attribute may compensate such change to ensure the path is still relevant.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

AndreyKudinov
Level 10
Just to give an example of where this can be used: http://rpachallenge.com/ (using IE, where xpath is not available).
Fields shift around every submit, so you need to find a label, then rewrite it's PATH to point to a related input, for which path would be dynamic = not spied in advance, but calculated in runtime.

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------

Thanks Andrey.. Can you tell me how to Read text from dynamic field used in Application Modeller  on a Obj studio ?

------------------------------
Aarthy A
------------------------------

In case of rpachallenge you need 2 elements spied:
Any Label ("First Name" for example), in modeller leave three attributes checked: Tag Name = LABEL, Match Index = 1, Value - set Dynamic
Any Input, 1 attribute is enough: PATH - set Dynamic 
 
Then to fill any field (e.g. "Last Name"), you do:
Read element Label, Data: Get Path, Params: Value = "Last Name", out - path(Text)
Write element Input,  Data: "Last Name From a file", Params: Path = Replace([path];"LABEL";"INPUT")
Repeat 7 times for each field.

Basically you set Dynamic field attributes when you use them, not when you spy them.

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------

Hi Aarthy,
I assume that you just want to read the value from the element in which you have made one of the attribute as dynamic 
For that you can follow the below steps :

In the Read Stage drag and drop the element  and click on the Params option 

772.png
Once you click it a new screen would appear where you can enter the attribute  value which you made Dynamic

After entering the above value you can Use Get Text in Read stage to store the value



773.png

------------------------------
Harshit Rawat
All State
------------------------------

Assume if a page has 10  Text field.  

What if i spy only one Text box and pass the ID as Dynamic.  ?  yes of course this will work no doubt. But what are the real challenges.  ?

------------------------------
Sankar Ganesh Kolappan
Sr Software Engineer
Bank Of the West
America/Phoenix
------------------------------

The challenge is only in your logic for determining what ID to pass in. There is no issue beyond that. I was about to list 2 reasons why you'd ever use it and then saw Bruce's answer above. So'll just defer to that because it's pretty much the only reason I'd use Dynamic. Granted for #2, it doesn't have to be the Path attribute. It could be any attribute that you need to use as dynamic, but I would for sure agree that the Path attribute is gets the most benefit from Dynamic.​

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Thanks for your response. In general we are not recommended to stick on path for any element. Which may cause issue. If we pass ID as dynamic. We may need to create lot of variables to manage element id.

------------------------------
Sankar Ganesh
------------------------------

Thanks for your response.  Yes of course. If the elements values changes frequently based on data and condition we may go with dynamic that is the best recommendation too.  Such as table cells and other value based element. 

The idea is 

Assume the target application is solid and it can be spy elelment only by ID also IDs not getting changed that frequent. What if i create App module text box element id;s passed as dynamic param and use one single text box elemnet for all the text boxes in the application.  

Yes for sure, need to created more variable for each no of text box.  for passing dynamic param value.

------------------------------
Sankar Ganesh
------------------------------