Slate UI TextBlock, Text_Lambda to update the Text?

I have a Slate widget that I create like this:

  void SetUpWidget()
    {
    
    	FText SlateHUDText = FText::FromString("This is the first text");
    
    
    	FLevelEditorModule& LevelEditor = FModuleManager::GetModuleChecked<FLevelEditorModule>(TEXT("LevelEditor"));
    	TSharedPtr<ILevelViewport> LViewport = LevelEditor.GetFirstActiveViewport();
    	
    
    	TSharedRef<SWidget> NewWidget = SNew(SOverlay)
    		+ SOverlay::Slot()
    		.VAlign(VAlign_Top)
    		.HAlign(HAlign_Center)
    		[
    			SNew(STextBlock)
    			.ColorAndOpacity(FLinearColor::White)
    		.Font(FSlateFontInfo("Veranda", 16))
    		.Text(TestHUDText)
    		//.Text_Lambda() // HOW TO?
    		];
    
    	LViewport->AddOverlayWidget(NewWidget);
    
    }

I have another function that updates a string variable on Tick. What I would like to do is BIND the string variable to the TSharedRef TextBlock, so that it updates every time the variable does. Is this done with the Text_Lambda attribute? Or is there another way?

Thanks!

Ah, solved it.

//.h

FString displayStr = "this string";

//from above code

.Text_Lambda([this]()->FText {return FText::FromString(displayStr); })

Lamda is new C++ feature from C++11 so not all C++ tutorials teach that Lambda expressions (since C++11) - cppreference.com