Jump to content
Sign in to follow this  
onno

perform find in portal

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

Recommended Posts

in my main file there is a portal showing corresponding invoices in a related file.

I would like to find the records that do not have (a) related invoice(s). I understand that it is impossible to perform a "zero records" find (result B) no records found).

What should I do.

Thank you for your help.

Share this post


Link to post
Share on other sites

Hi,

try this one:

1. define in your main file an "constZero" field with option auto enter data 0 (you'll need to perform replace for already existing records).

2. allways in main define an calc field result number say hasInvoice as

hasInvoice=Count(relName::invoiceID)

where relName is your relationship used for displaying invoices in portal.

3. finally define an relationship in main NoInvoices::hasInvoice-->constZero

4. create an script

set error capture on

GTRR [noInvoices, show only related]

//handle no related records

HTH

Dj wink.gif

Share this post


Link to post
Share on other sites

ooops, I was writting without thinking. So of course last step won't work.

Instead you'll have to perform find ( in main) on hasInvoice=0 (BTW it's an unindexed field so the search might yield some time if large number of records is involved).

Than also you don't need neither step 1 and step 3.

sorry crazy.gif

Dj

Share this post


Link to post
Share on other sites

Yep, it works. I have tried to do what you explained in your first reply but I soon found out that just creating the calc field hasInvoice=count(relName::invoiceID) would do the trick.

Thanks a lot!

Share this post


Link to post
Share on other sites

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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