Perform "memory trick" to pre-populate a survey form

Hi,

I do a lot of surveys that are similar to each other and I’m trying to build some “memory” into my survey form to save the surveyor some time and increase accuracy.

I use MAXROW(Survey, _RowNumber) in a VC to allow Initial Value dereferences to pre-populate a new survey form with options used in the previous survey.

This “memory trick” works OK when a single asset was surveyed but doesn’t work after a multiple asset survey.

I’d like to use a similar “memory trick” so that if a surveyor selects the multiple assets button [survey_type] an expression will return the most recent [previous] column value where [previous] column has more than 1 item in it.

Typical UseCase:

  1. Survey 10 data cables in cable route (1 survey form + OnSave action to generate 9 additional rows)
  2. Stop to survey single wi-fi access point where 1 data cable ends
  3. Survey 9 remaining data cables
  4. Repeat step 3 until next wi-fi access point is reached

I’m busy playing with versions of the following but it clearly doesn’t work:

LOOKUP(
MAX(
SELECT(
survey[_ROWNUMBER],
([_THISROW].[previous] = COUNT([previous] > 0))
)
),
“survey”,
“_ROWNUMBER”,
“previous”
)

Thanks in advance for any assistance…

Samples of survey form and survey table below


Solved Solved
0 2 233
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

You were close!

Your expression:

LOOKUP(
  MAX(
    SELECT(
      survey[_ROWNUMBER],
      ([_THISROW].[previous] = COUNT([previous] > 0))
    )
  ),
  “survey”,
  “_ROWNUMBER”,
  “previous”
)

My suggestion:

LOOKUP(
  MAX(
    SELECT(
      survey[_ROWNUMBER],
      (COUNT([previous]) > 1)
    )
  ),
  “survey”,
  “_ROWNUMBER”,
  “previous”
)

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

You were close!

Your expression:

LOOKUP(
  MAX(
    SELECT(
      survey[_ROWNUMBER],
      ([_THISROW].[previous] = COUNT([previous] > 0))
    )
  ),
  “survey”,
  “_ROWNUMBER”,
  “previous”
)

My suggestion:

LOOKUP(
  MAX(
    SELECT(
      survey[_ROWNUMBER],
      (COUNT([previous]) > 1)
    )
  ),
  “survey”,
  “_ROWNUMBER”,
  “previous”
)

Thanks @Steve,

I had borrowed that from one of your earlier posts… Works beautifully… Cheers…

Top Labels in this Space