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.

PDM Get_Row and SQL describe

Featured Replies

This is a real fun that I got of PDM plugin.

Instead to get retreived each row of this simple SQL query I'm getting each second row.

Does anyone share my experience or better if has a tip about this situation?

Hvala(Thanks)!

SetField[Field_Desc; External ( "SQL-execQuery"; "DESC Table_Name" )]

Loop

SetField[Field_Get_Row;External ( "SQL-getRow"; "" )]

ExitLoopIf

EndLoop

  • Author

Might be the tip for next "victime at the same trap".

It doesnt work well with the loop. So, instead to loop, make several copy-paste (depending on number of expected results)B)

/////////////////////////////////

If (Field_Get_Row = "EMPTY")

exit

endif

SetField[Field_Get_Row;External ( "SQL-getRow"; "" )]

If (Field_Get_Row = "EMPTY")

exit

endif

SetField[Field_Get_Row;External ( "SQL-getRow"; "" )]

///////////////////////////

Ugly solution like a pain. Might be better to figure out Recursive function which will make calls to the "SQL-getRow"...

  • Author

One simple solution with recursive custom function:

Custom function named as: ST_PDM_Get_Row.

Without paramethers.

Let (

$GET_ROW = External ( "SQL-getRow"; "" );

Case (

PatternCount ( $GET_ROW; "EMPTY" ) = 0;

ST_PDM_Get_Row ( ) & ¶ & $GET_ROW;

$GET_ROW

)

)

So, when you have to call it in a script, first make SQL query and then:

SetField [some_Global_Field; ST_PDM_Get_Row()]

After you get retreived SQL records in global field first have to substitute "EMPTY" with "" and then, if needed, to parse out each separate record to the supposted non-global fields.

Works out in me case.

:tigger:

  • Author

Ups, little correction:

Let (

$GET_ROW = External ( "SQL-getRow"; "" );

Case (

PatternCount ( $GET_ROW; "EMPTY" ) = 0;

ST_PDM_Get_Row ( ) & ¶ & $GET_ROW;

""

)

)

In this case you dont need to get rid off(substitute) "EMPTY" in retreived result array.

  • 5 weeks later...
  • Author

One WARNING about using this custom function! There is some unexpectable limitation on amount of retreived data. The recommended amount is "middle size" of data. Test this solution on your case before applay it.

This is most simple solution and these kind are always most stable in programming:

Case (

External ( "SQL-getRow"; "" ) = "EMPTY";

"";

ST_PDM_Get_Row ( ) & ¶ & External ( "SQL-getRow"; "" )

)

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.