Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Dynamically change a request

api_tester Posts: 28

Hi Team,

Can we dynamically change our soap request based on datasource value.
We have a column in datasource having value as 3 ,so I want to add a block of elements 3 times. If my column value is 2, then I need to add the elements 2 times dynamically based on the value of the datsource. Can we change the request like this? Is there any provision in Parasoft? Kindly help.

Thanks in Adv. :smile:


  • benken_parasoft
    benken_parasoft Posts: 1,243 ✭✭✭
    edited January 2020

    There are various ways to add occurrences of elements dynamically based on data sources. However, it works differently than the way you are asking. There a couple different ways, one using Excel sheets and another approach using Data Repository data source. Here are some relevant sections of the user documentation:
    Parameterizing Arrays of Varying Size
    Working with Large Hierarchical Data Sets > Consuming the Data in Tools

    There is also an approach where you can replace an element completely with the content of a data source column, which is sometimes used to replace a placeholder element with one or more elements in a data source cell. The option is called "Replace with Data Source Value". It is available in the right-click menu in Form Input for XML and I think is also available in Form JSON as well.