Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi i'm trying to write a script creating a report and i need somewhere some steps to pull information from several portal rows into 1 or many fields horizontally in my report...

Let's expand: I have a layout (labreport) where i enter results from tests in a portal (from Result table)

My report is showing records mainly from an other table (testdetail) so i need to get the results related to each records and fill them in the report.

So far i've been told that i should use 1 field in my report and Concatenate, so here i am trying to do this but i'm having trouble scripting the fact that the results are coming from portalrows

What i have is something like:

Go to related record (...)

Go to portal row (first)

Set Field (results=results1)

Go to portal row (next)

Set Field (results=results2)

etc...

and the Result field on the report is a calculation field such as

Result=result1 & result2 & etc...

and it doesnt show any error but instead of filling in the true results, it puts a set of 0 frown.gif

Any suggestion on how to sort this mess would be much apreciated smile.gif

THANKS

Why "Go to related record"?

I think that this will work if you will delete "Go to related record" script or i didnt understand you.

  • Author

Thanks it does solve the problem of filling in only one record instead of all records in the report, but i still get 0 everywhere, any idea why??

It's much easier to do this from the related table.

Set Field [Results; ""]

Go to Related Record [show only related; "ResultRelationship"; using Layout "Results"]

Loop

Set Field [LabReportRelationship::Results; LabReportRelationship::Results & ResultField &

  • Author

It must be the cold weather and the snow we have today, but my brain is not in gear, and i really can't see how to use these steps...

I tried the ValueList solution, no more luck in there, i'm getting "?" everywhere..

This is all very confusing frown.gif

_ "Set Field [Results;""]" _ what do u set it to??

_ "Set Field [LabReportRelationship::Results ; LabReportRelationship::Results & ReultField &

  • Author

I think it must have finally defrost up there... I now understand a bit more what's going on

Although i still have 2 issues:

_it only display the last result value (how can i make it store all of them and display horizontally?)

_it only operate on 1 single record of the report

attached is the part of my script "trying" to do it all smile.gif

THANKS for your help

untitled.JPG

Well, you said you wanted to concatenate the related results into one field, which is what the concatenation step does, although if you want to display it horizontally, change the

  • Author

Well, thank you for your explanation, it's almost there but still missing something...

Attached are my db, my relationships graph and my new version of the script.

It is written a bit simpler than you suggested but at least i know wht i'm doing smile.gif It works except the fact that it only fills in results for the active "test no" in the "Lab Report" layout

I think the tricky part in this is that in the "Lab Report" layout, it is 1 single record grouping all the "test no" but in the report >> "Test Report" layout >> it is multiple records...

Fyi, the perform find is not finalized yet but it should only find one record

and the result field on the report concatenate the 10 results fields (result1 &" , "& result2 &" , "& result3 & etc...)

On the latter part i have something that looks like a bug because when i put sample records to try, 1,2,3,4,5,6 works fine (displayed as such) but when i have 81,82,83,84,85,86 it displays 8.1828E+11 (but if i click into the field in browse mode it does shows the correct info frown.gif )

THANKS for your help, it is much appreciated smile.gif

script.zip

Test Detail::Results is a number field. It should be text. 81, 82, 83, 84, 85, 86 makes no sense as a number.

  • Author

Thanks a lot, that was it, works perfectly fine now smile.gif

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.