cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Manipulation of Data Table in column Amount not possible

Hey everybody,

I have a problem with DataTable. If I think logically, it should be right but the results aren't shown the way I'd like it to be shown.

 

Following situation:

- I select the column of the data table and there's ThisItem.Amount (number) in the text property. Everything is shown correctly.

- I want to prefix the number with a "-" character with following line of code:

 

 

Switch(ThisItem.AddRemove, 'AddRemove (CommonDataService)'.No, "- ") & ThisItem.Amount

 

 

But as result following will be output for example:

Amount    
200    
200    

Wrong values.

Code:

 

Switch(ThisItem.AddRemove, 'AddRemove (CommonDataService)'.No, "- ") & ThisItem.Amount

 

 

But I'd like to achieve this:

Amount    
- 300    
- 200    

Correct values due to CDS.

 

Standard:

Amount    
300    
200    

Values like in CDS.

Code:

 

ThisItem.Amount

 

 

 

 

I hope you do understand what I mean.

 

Appreciate your support! Thanks so much!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Manipulation of Data Table in column Amount not possible

Hi @ThePowerAppsGuy ,

Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. The formula you provided is correct.

 

I think this issue may be related to Data Table control itself. I would post this issue to my Product Team, if the issue is fixed, I would reply here.

 

As an alternative solution, please consider add a Gallery control to achieve your needs. You could consider configure the Gallery as a GRID table:

4.JPG

Add a Gallery in your app, connect it to your CDS Entity data source. Add a several Labels inside the Gallery, configure it as a GRID table as above screenshot. Then set the Text property of one Label inside the Gallery to following:

Switch(ThisItem.AddRemove, 'AddRemove (CommonDataService)'.No, "- ") & ThisItem.Amount

or

If(
   ThisItem.AddRemove = 'AddRemove (CommonDataService)'.No,
   "- ",
   Blank()
) & ThisItem.Amount

then the desired result as you mentioned would be displayed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver II
Resolver II

Re: Manipulation of Data Table in column Amount not possible

Hey @v-xida-msft,

 

Hmmm... it doesn't seem to be working either.  I was trying to follow your solution with Gallery, it turns out to be a little bit better but the main aspect with the character isn’t be solved either.

 

At least the values are shown correctly now but no character is prefixed.

 

Maybe there's somebody with similar experience...

 

Thanks so much for helping!

 

------- Update -------

I'm using the Edge Browser and changed the language into English. As I rechanged it into my native language and back, the issue has been resolved and the character "-" is displayed.

 

It's working in the gallery but not in the data table unfortunately.

 

That's all!

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Manipulation of Data Table in column Amount not possible

Hi @ThePowerAppsGuy ,

Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. The formula you provided is correct.

 

I think this issue may be related to Data Table control itself. I would post this issue to my Product Team, if the issue is fixed, I would reply here.

 

As an alternative solution, please consider add a Gallery control to achieve your needs. You could consider configure the Gallery as a GRID table:

4.JPG

Add a Gallery in your app, connect it to your CDS Entity data source. Add a several Labels inside the Gallery, configure it as a GRID table as above screenshot. Then set the Text property of one Label inside the Gallery to following:

Switch(ThisItem.AddRemove, 'AddRemove (CommonDataService)'.No, "- ") & ThisItem.Amount

or

If(
   ThisItem.AddRemove = 'AddRemove (CommonDataService)'.No,
   "- ",
   Blank()
) & ThisItem.Amount

then the desired result as you mentioned would be displayed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver II
Resolver II

Re: Manipulation of Data Table in column Amount not possible

Hey @v-xida-msft‘,

 

Thanks so much for your reply.

I will try.

Highlighted
Resolver II
Resolver II

Re: Manipulation of Data Table in column Amount not possible

Hey @v-xida-msft,

 

Hmmm... it doesn't seem to be working either.  I was trying to follow your solution with Gallery, it turns out to be a little bit better but the main aspect with the character isn’t be solved either.

 

At least the values are shown correctly now but no character is prefixed.

 

Maybe there's somebody with similar experience...

 

Thanks so much for helping!

 

------- Update -------

I'm using the Edge Browser and changed the language into English. As I rechanged it into my native language and back, the issue has been resolved and the character "-" is displayed.

 

It's working in the gallery but not in the data table unfortunately.

 

That's all!

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,966)