web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Format datacard from l...
Power Apps
Answered

Format datacard from lookup column

(0) ShareShare
ReportReport
Posted on by 157

Hello again, 

 

I have this list column as number with no decimals 

1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Which is a lookup column in another list that displays correctly 

2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

By default the machine number is displayed in my app gallery with lots of following 00000s 

And I use the following formula to correct the display 

First(Split(ThisItem.'Numéro Machine'.Value; "." )).Result

 

3.png

 

 

 

 

 

 

 

However I can not apply the same logic to the display in the datacard of a form, it displays with all the zeros

4.png

 

 

 

 

 

 

I need to filter the datacard to remove blank machine numbers so the defaultSelectedItems is

Filter(Choices([@MainIntList].'Numéro Machine');!IsBlank(Value))

 

How do I combine the filter above with 

First(Split(ThisItem.'Numéro Machine'.Value; "." )).Result

 

so that the list is filtering out blank rows and removing the .000000s ?? 

 

thanks 

Categories:
I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @td1979 ,

     

    Please try:

    ForAll(Filter(Choices([@MainIntList].'Numéro Machine');!IsBlank(Value));Text(Value(Value);"0"))

    vdezhilimsft_0-1675910358357.png

    vdezhilimsft_1-1675910379940.png

     

    Best Regards,

    Dezhi

     

     

  • td1979 Profile Picture
    157 on at

    Hi, thanks - your solution worked perfectly! 

     

    May I pose a second question: In the datacard for the machine number I have the following in the defaultSelectedItem

     

    If(
     IntMainForm_1.Mode = FormMode.New;
     
     Blank();
     Parent.Default
    )

     

    I have tried to incorporate the code example you gave, for example

    If(
     IntMainForm_1.Mode = FormMode.New;
     
     Blank();
     Text(Value(Parent.Default);"0")
    )

     

    but with no success, how is this achieved?

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @td1979 ,

     

    Please try:

    If(
     Not(IntMainForm_1.Mode =1);
     Text(Value(Parent.Default);"0")
    )

     

    Best Regards,

    Dezhi

  • td1979 Profile Picture
    157 on at

    I get the following error (which is the same I had with the previous formula) 

     

    td1979_0-1675928462376.png

    "Expected Table Value"

    "Text or number was expected, We are expecting text or number at this point in the formula"

    "The function "Value" contains invalid arguments"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard