Trouble with linked columns : result from script is different from screen

Hello

Your Setup:

  • SeaTable Edition ( Enterprise)

Describe the Problem/Error/Question:

I have 2 tables linked together :

Table Parent :

Table Childs :

In Parent, I want MaxStatus to be dependent on the value of the Childs Status.
Because Formula Link (FindMax) is not ok with text, I used formula

The result in the table Parent is ok :slight_smile: MaxStatus is ‘hot’ everywhere

What is not ok is when I export the data with code :

image
there is one ‘medium’ !

with simple code :

from seatable_api import Base, context
server_url = context.server_url 
api_token = context.api_token
base = Base(api_token, server_url)
base.auth()
rows=base.list_rows('Parent')
filtered_rows = [
    {'Name': row.get('Name'), 'Status': row.get('MaxStatus')}
    for row in rows ]
print(filtered_rows)

Is it a bug on the way it handles linked columns ? or what am I doing wrong ?

Thanks,
Rémi.

So to summarize your question: You get different results from the seatable webinterface and python code?

In the web interface you get 2x hot and from your python code you get 1x hot and 1x medium?
Is that your issue?

Yes that is correct : different output between webinterface (hot + hot) and Python code (medium + hot). We noticed also same behaviour with API.

Hi @Remi,

I was able to reproduce your problem, even if I can’t explain it :thinking:. I just wanted to give you a simple workaround (of course this issue still needs to be solved however), in case this problem is blocking you but maybe you already found it:

  • Create a Childs status lookup-type column in your parent table to get the status of each linked child
  • Adapt your MaxStatus formula by replacing {Childs.Status} by {Childs status} everywhere
  • Doing so, Python will retrieve the same value as the webinterface

Bests,
Benjamin

Thank you Ben for looking into it.
You are right, the workaround is ok. However I hope you find solution since if plays on data reliability.