ngoeller

Reference active Field in a Portal

Discussion created by ngoeller on Apr 4, 2017
Latest reply on Apr 4, 2017 by philmodjunk

I apologize if I've put this post in the wrong place, I'm new here.

I have a form where I need to enter the current time a lot, each reading requires a time.

I have a portal with records for each field visit, each portal row may have 3 to 5 time readings for measurements.

so to save time I wanted the time field to auto-populate on activation, so when the field is selected (on an iPad) it drops in the current time.

what I wanted to have was a script, on activation, which reads the active field, checks if it's empty (so the time is not constantly overwritten)

and if empty puts in the current time.

 

I have tried :

I tried

If [IsEmpty ( Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) ) ]

but it doesn't get into that loop.

 

I also tried setting a variable to test for isblank

Set Variable [$test; Value: Get ( ActiveFieldTableName )&"::"& Get (ActiveFieldName)]

if [IsEmpty ( $test) ]

but isempty doesn't seem to see the variable as an adress.

 

any help would be greatly appreciated, it would save having 1 script for every time cell..

Outcomes