cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Coopedup
Resolver I
Resolver I

Text compare from SP pick list

Hi,

 

I've had to make a number of field type changes in my SP List source, so now having to correct SOOOO much!

 

2 questions...

If I change a source field from text to pick list, is there an easy way to update all of my form cards (It only works if I recreate all the forms)? 

 

I have a number of if statements where I have field checks, which worked well when they were text file 'field a' = "TEXT", but now that filed a is a pick list the "=" sign has an error! How do I text compare a pick list field?

 

Thanks!
Neil

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Coopedup 

There are a lot of little gotchas in what you are doing...but in general, this is not so difficult.

If you change a column in your List to another type, you can refresh the datasource in your PowerApp, then go to your form and remove the datacard for the old type, then add it back in.

As for Formulas you might have, there will be adjustments needed.  The first tip I can give you is to make sure your Formulas reference yourForm.Updates.FieldName and not things like datacardvaluex as, when you change types in your forms, those controls will go away...the column will not - thus you will have MUCH less work to do to correct.

 

Now...also you mention the equality problem.  Once you change to a Choice column, your column value will be a record.  So, you need to reference the Record Value to compare ex. yourForm.Updates.yourColumn.Value = "something"

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

1 REPLY 1
RandyHayes
Super User III
Super User III

@Coopedup 

There are a lot of little gotchas in what you are doing...but in general, this is not so difficult.

If you change a column in your List to another type, you can refresh the datasource in your PowerApp, then go to your form and remove the datacard for the old type, then add it back in.

As for Formulas you might have, there will be adjustments needed.  The first tip I can give you is to make sure your Formulas reference yourForm.Updates.FieldName and not things like datacardvaluex as, when you change types in your forms, those controls will go away...the column will not - thus you will have MUCH less work to do to correct.

 

Now...also you mention the equality problem.  Once you change to a Choice column, your column value will be a record.  So, you need to reference the Record Value to compare ex. yourForm.Updates.yourColumn.Value = "something"

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (41,935)