Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

How to store some rows selected from one table in a document property(as rows)?


giuseppe valenti

Recommended Posts

A document property can be a simple number or string, an array of strings or a binary object. I have seen tables stored into document properties as binary objects, but only via a data function. Once one has a table in a document property, then it can be parsed by another data function. There could be a simpler way to achieve what you wish to do without storing a set of rows in a document property, if you can share what the context is.

Link to comment
Share on other sites

Hello,what i need to do is set a db on demand from 2 different pages,the field is the same columns "lots" but from 2 different tables and pages,sometimes i need to set from pag1 and other times from pag2. This to link an on demand db with many rows to show maps that i can call from pag1 or pag2.

See attachment for a better description.

pag1pag1.thumb.jpg.9130391547aac1b56917e1fcb26ebcb4.jpgpag2

pag2.thumb.jpg.b00690c19c420543bf72706e749e130d.jpgThanks!

Link to comment
Share on other sites

Hello Giuseppe,

Suppose you have two tables A and B and you could somehow populate a third table called AB. If you could do that, you can easily setup your on-demand data table based on the contents of AB

A data function can do this for you by taking two parameters (colA and colB) based on marking from table A and B and create a new table (or replace the existing one) with the union from both

# create sample arraysa = arr1b = arr2 # determine the length of the shorter arraymin_len = min(len(a), len(b)) # combine the elements in the two arrays row-wisecombined_array = []for i in range(min_len): combined_array.append(a) combined_array.append(b) # append any remaining elements from the longer arrayif len(a) > len(b): combined_array.extend(a[min_len:])elif len(b) > len(a): combined_array.extend(b[min_len:]) 

the input parameters for arr1 and arr2 are Columns limited by marking and the output is a new data table

Here is the POC in action

twotables.thumb.gif.dd789ce51d554854dcdab3ec1a735182.gif 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...