How to getScreenData of Specific Row?

Hi All,

I've been trying to get the data on the screen of ROW DETAILS SCREEN, how can I dynamically change the row that the screen returns?

Hi Mark,

Thanks for your question here!

You are able to dynamically change the row in a different query as long as you are querying the same screen.

To achieve this, you would first use GetScreenData on a screen with a list. Then you can build an index of row-ids in your script.

From there, if you wish to dynamically call GetScreenData for a specific row, you can pass in the desired row-id that you have cached from your previous call to GetScreenData on a screen with a list.

You can refer here in this article for more around GetScreenData parameters.

Let us know if this helps. :honeybee:

I'm trying to pass a variable to the api call sample is variables: {"ID": "rawValue":"10001" } in $[InputRow] using the Detail Screen, but it only returns blank rows[], the block which shows the data only returns the variable names. I cannot use the screen which shows all the rows because some of the column are only visible on the Details Screen

Hi @Mark-9007,

Thanks for the reply, happy to help -

First, we'll note that {"ID": "rawValue":"10001" } is actually not the correct format to call the variable. You would want to instead use the following format:

   variables = {"Row": {"rawValue": "<<Table row ID goes here>>"}

And the table row ID would look something like row:1234-12341234:123123-12345.

In regards to the using the screen with the list, you don't need to put all of the columns in the list screen. The purpose of this screen is just to get the row-ids. So let's say for example, you have an ID column in your list, and the output looks something like this:

"rows": [
        {
          "dataItems": [
            {
              "formattedValue": "10001",
              "rawValue": "10001"
            }
          ],
          "tableRowId": "row:xxxxx-xxxxx:xxxxx-xxxxx"
        },
        {
          "dataItems": [
            {
              "formattedValue": "10002",
              "rawValue": "10002"
            }
          ],
          "tableRowId": "row:yyyyy-yyyyy:yyyyy-yyyyy"
        }
      ]
    }

From this, you could see that for your ID 10001, that the table row ID is row:xxxxx-xxxxx:xxxxx-xxxxx.

Hope this helps :slight_smile: Let us know. :honeybee:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.