Jump to content

Go to related record OR Go to record


This topic is 2886 days old. Please don't post here. Open a new topic instead.

Recommended Posts

HI!

 

I am trying to create a script that will jump from one layout/table to the related record in another layout/table (if there is a related record) OR to the first record in the destination layout/table (if there is no related record). I know how to do this separetly but not as a part of the same script. Any ideas?

I know I could create two buttons with different script but the idea is to have only one button that would perform either "Go to related record" or "Go to record first" if there is no related record in the destination table/layout.

 

Thanks!

 

Link to comment
Share on other sites

16 minutes ago, sinisa93 said:

the idea is to have only one button that would perform either "Go to related record" or "Go to record first" if there is no related record

Why don't you do exactly what you said:
 

If [ IsEmpty ( RelatedTable::Matchfield ) ]
  Go to Record [First]
Else
  Go to Related Record [...]
End If

 

Link to comment
Share on other sites

Hi!

Thank you for your reply. Since I'm only a beginner, obvious solutions are not so obvious to me :) In the end I didn't use your suggestion but It helped me a lot to create my own. So thanks, once again.

If [Id number::Table 1 ≠ Id number::Table 2]
  Go to layout ["Table 2" (Table 2)]
  Go to Record [First]
Else
  Go to Related Record [...]
End If
Link to comment
Share on other sites

This topic is 2886 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.