giuseppe valenti Posted March 4, 2023 Share Posted March 4, 2023 Is there a way to store in a document property the rows selected from a table?I need to set this document property from different tables/pages that have the same column,eventually in iron python script if not possible with standard functions.Many thanks. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted March 7, 2023 Share Posted March 7, 2023 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 More sharing options...
giuseppe valenti Posted March 7, 2023 Author Share Posted March 7, 2023 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.pag1pag2Thanks! Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted March 8, 2023 Share Posted March 8, 2023 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 ABA 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 tableHere is the POC in action Link to comment Share on other sites More sharing options...
giuseppe valenti Posted March 9, 2023 Author Share Posted March 9, 2023 Thank you very much,i will try to follow your suggestion. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now