Been a while, good afternoon folks!
i need a syntax check.... WTH is wrong with this???!!!
LINKTOFORM("Dialysis Rouding_Form",
"_patientIdentifier",[_THISROW].[_patientIdentifier],
"Timestamp",NOW(),
"Company",ANY(SELECT(Dialysis[Company],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Location",ANY(SELECT(Dialysis[Location],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Modality", ANY(SELECT(Dialysis[Modality],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Notes",lookup(maxrow("Dialysis Rouding","Timestamp", AND(([_patientIdentifier]=[_thisrow].[_patientIdentifier]),isnotblank([Notes])),"Dialysis Rouding","_patientIdentifier", "Notes"))
)
I know that Rouding is spelled wrong, but i spelled that field wrong when i made it so i have kept that convention....
this works, but the above does not:
LINKTOFORM("Dialysis Rouding_Form",
"_patientIdentifier",[_THISROW].[_patientIdentifier],
"Timestamp",NOW(),
"Company",ANY(SELECT(Dialysis[Company],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Location",ANY(SELECT(Dialysis[Location],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Modality", ANY(SELECT(Dialysis[Modality],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Notes",lookup(maxrow("Dialysis Rouding","Timestamp", ([_patientIdentifier]=[_thisrow].[_patientIdentifier])),"Dialysis Rouding","_patientIdentifier", "Notes")
)
what i am trying to have happen is, when a provider goes to mark a dialysis patient visit, certain things in the form are prefilled, and it mostly works... That last part, i am wanting to copy any notes from the most recent dialysis visit, if it is not blank... With the expectation of, if the last visit had no notes, but the one before it did, it would pull those notes over as a "draft" in the current visit so i can be amended . this is a few feature i am adding, so i want the next visit that happens to pull the most recent non-blank note as a draft.
I've tried a few variations but keep getting varied error responses as I try to add the AND() expression to ensure that blank entries are not considered.
Take one of the two closing paragraphs at the end of your formula after "Notes"))
And move it just before: ,"Dialysis Rouding"
LINKTOFORM("Dialysis Rouding_Form",
"_patientIdentifier",[_THISROW].[_patientIdentifier],
"Timestamp",NOW(),
"Company",ANY(SELECT(Dialysis[Company],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Location",ANY(SELECT(Dialysis[Location],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Modality", ANY(SELECT(Dialysis[Modality],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Notes",lookup(maxrow("Dialysis Rouding","Timestamp", AND(([_patientIdentifier]=[_thisrow].[_patientIdentifier]),isnotblank([Notes]))),"Dialysis Rouding","_patientIdentifier", "Notes")
)
that most certainly fixed the issue that Appsheet was complaining about but has yielded that i have done something else wrong in my expression to prefill the Notes column. Now to figure that out.
Thank you
Here's your expression reformatted and corrected:
LINKTOFORM(
"Dialysis Rouding_Form",
"_patientIdentifier",
[_THISROW].[_patientIdentifier],
"Timestamp",
NOW(),
"Company",
ANY(SELECT(Dialysis[Company],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Location",
ANY(SELECT(Dialysis[Location],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Modality",
ANY(SELECT(Dialysis[Modality],[_THISROW].[_patientIdentifier] = [_patientIdentifier])),
"Notes",
lookup(
maxrow(
"Dialysis Rouding",
"Timestamp",
AND(
([_patientIdentifier]=[_thisrow].[_patientIdentifier]),
isnotblank([Notes])
)
),
"Dialysis Rouding",
"_patientIdentifier",
"Notes"
)
)
Missing parenthesis:
User | Count |
---|---|
34 | |
11 | |
3 | |
2 | |
2 |