cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gennarodp
Post Patron
Post Patron

Save text data in a label from nfc in powerapps

Hello everyone, i am trying to save text data from nfc in a label.

 

How can i do this ?

 

I have created a button with onselect property that scans code, but i don't know how save this text data on a label.

 

Anyone can help me ?

 

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
C-Papa
Super User
Super User

try the below, i haven't been able to test but this should work

 

on the button OnSelect: Set(var_My_Scanned_Tag, ReadNFC()) 

 

For the label text property, add var_My_Scanned_Tag. when you type the last . after tag it will show you you available options to display. you probably want var_My_Scanned_Tag.Text

View solution in original post

v-qiaqi-msft
Community Support
Community Support

Hi @gennarodp,

Based on the issue that you mentioned, do you want to display NFC value in a Label?

Could you please share a bit more about your scenario?

 

Actually, the  ReadNFC() returns a record containing the following field:

vqiaqimsft_0-1635475373303.png

 

ReadNFC is only supported when running the app in a native mobile player such as the iOS and Andriod players. Even with a supported player, a device may not support NFC, in which case a message will be shown to the user and the function will return a blank record.

Please note that Text and URI datatypes are supported.

 

Add a Label and set the Text property as below:

With( ReadNFC(), 
      If( Not IsBlank( Text ), 
            "Read Text: " & Text, 
          Not IsBlank( URI ),
            "Read URI: " & URI ,
          "Didn't read Text or URI" 
      )
)

 

Best Regards,
Qi

View solution in original post

3 REPLIES 3
C-Papa
Super User
Super User

try the below, i haven't been able to test but this should work

 

on the button OnSelect: Set(var_My_Scanned_Tag, ReadNFC()) 

 

For the label text property, add var_My_Scanned_Tag. when you type the last . after tag it will show you you available options to display. you probably want var_My_Scanned_Tag.Text

it doesnt' work 😞

 

 

v-qiaqi-msft
Community Support
Community Support

Hi @gennarodp,

Based on the issue that you mentioned, do you want to display NFC value in a Label?

Could you please share a bit more about your scenario?

 

Actually, the  ReadNFC() returns a record containing the following field:

vqiaqimsft_0-1635475373303.png

 

ReadNFC is only supported when running the app in a native mobile player such as the iOS and Andriod players. Even with a supported player, a device may not support NFC, in which case a message will be shown to the user and the function will return a blank record.

Please note that Text and URI datatypes are supported.

 

Add a Label and set the Text property as below:

With( ReadNFC(), 
      If( Not IsBlank( Text ), 
            "Read Text: " & Text, 
          Not IsBlank( URI ),
            "Read URI: " & URI ,
          "Didn't read Text or URI" 
      )
)

 

Best Regards,
Qi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,444)