Problem with declaration scope

hello. i have a problem everytime i try to compile and run this code it says the text has not been declared in this scope.here is the code:

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

void setup() {
Serial.begin(9600); // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
display.begin(SSD1306_SWITCHCAPVCC, 0x3D); // initialize with the I2C addr 0x3D (for the 128x64)
display.display();
delay(2000);
display.clearDisplay(); // Clear the buffer.
}

void loop() {
//CHECK THE SERIAL PORT FOR INCOMING MESSAGES
//THE ARDUINO APP SENDS A TEXT STRING THROUGH BLUETOOTH EVERY SECOND
//THE STRING SHOULD RESEMBLE THIS: date | time | phone | text \n
while(Serial.available() > 0){

//READ THE STRING TO THE FIRST "|" DIVIDER AND STORE AS A VARIABLE
String Date = Serial.readStringUntil('|');
Serial.read();

//STORE THE NEXT SECTION OF STRING AS A VARIABLE
String Time = Serial.readStringUntil('|');
Serial.read();

//STORE THE THIRD SECTION OF STRING AS A VARIABLE
String Phone = Serial.readStringUntil('|');
Serial.read();

//STORE THE FINAL SECTION AS A VARIABLE
String Text = Serial.readStringUntil('\n');
Serial.read();
}
if(Text == "text" && Phone == "phone")
{ display.println(Date);
display.display();
display.println(Time);
display.display();
display.clearDisplay();

}

if (Text != "text" && Phone == "phone"){
display.println(Text);
display.display();
delay(5000);
display.clearDisplay();
}

if (Text == "" && Phone != "phone"){
display.println(Phone);
display.display();
delay(5000);
display.clearDisplay();
}

}

Text is declared in the code block of a while loop so can only be used there

You need to read up on and understand the scope of a variable in C